pub struct RepoKeysBuilder { /* private fields */ }Expand description
Helper to construct RepoKeys.
Implementations§
Source§impl RepoKeysBuilder
impl RepoKeysBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new RepoKeysBuilder.
Sourcepub fn add_root_key(self, key: Box<dyn PrivateKey>) -> Self
pub fn add_root_key(self, key: Box<dyn PrivateKey>) -> Self
Add a PrivateKey that will be used as a root key.
Sourcepub fn add_targets_key(self, key: Box<dyn PrivateKey>) -> Self
pub fn add_targets_key(self, key: Box<dyn PrivateKey>) -> Self
Add a PrivateKey that will be used as a targets key.
Sourcepub fn add_snapshot_key(self, key: Box<dyn PrivateKey>) -> Self
pub fn add_snapshot_key(self, key: Box<dyn PrivateKey>) -> Self
Add a PrivateKey that will be used as a snapshot key.
Sourcepub fn add_timestamp_key(self, key: Box<dyn PrivateKey>) -> Self
pub fn add_timestamp_key(self, key: Box<dyn PrivateKey>) -> Self
Add a PrivateKey that will be used as a timestamp key.
Sourcepub fn load_root_keys(self, path: &Path) -> Result<Self, ParseError>
pub fn load_root_keys(self, path: &Path) -> Result<Self, ParseError>
Load root metadata PrivateKeys from a pm-style json file.
Sourcepub fn load_targets_keys(self, path: &Path) -> Result<Self, ParseError>
pub fn load_targets_keys(self, path: &Path) -> Result<Self, ParseError>
Load targets metadata PrivateKeys from a pm-style json file.
Sourcepub fn load_snapshot_keys(self, path: &Path) -> Result<Self, ParseError>
pub fn load_snapshot_keys(self, path: &Path) -> Result<Self, ParseError>
Load snapshot metadata PrivateKeys from a pm-style json file.
Sourcepub fn load_timestamp_keys(self, path: &Path) -> Result<Self, ParseError>
pub fn load_timestamp_keys(self, path: &Path) -> Result<Self, ParseError>
Load timestamp metadata PrivateKeys from a pm-style json file.
pub fn build(self) -> RepoKeys
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RepoKeysBuilder
impl !RefUnwindSafe for RepoKeysBuilder
impl !Send for RepoKeysBuilder
impl !Sync for RepoKeysBuilder
impl Unpin for RepoKeysBuilder
impl UnsafeUnpin for RepoKeysBuilder
impl !UnwindSafe for RepoKeysBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more