pub struct RepoKeys { /* private fields */ }Expand description
Hold all the private keys for a repository.
Implementations§
Source§impl RepoKeys
impl RepoKeys
Sourcepub fn generate(dir: &Path) -> Result<Self, ParseError>
pub fn generate(dir: &Path) -> Result<Self, ParseError>
Generates a set of [RoleKey]s, writing the following files to the passed dir:
- root.json
- targets.json
- snapshot.json
- timestamp.json
Returns the generated RepoKeys struct.
Sourcepub fn builder() -> RepoKeysBuilder
pub fn builder() -> RepoKeysBuilder
Return a RepoKeysBuilder.
Sourcepub fn from_dir(path: &Path) -> Result<Self, ParseError>
pub fn from_dir(path: &Path) -> Result<Self, ParseError>
Create a RepoKeys from a pm-style keys directory, which can optionally contain the following files:
- root.json - all the root metadata private keys.
- targets.json - all the targets metadata private keys.
- snapshot.json - all the snapshot metadata private keys.
- timestamp.json - all the timestamp metadata private keys.
Sourcepub fn root_keys(&self) -> &[Box<dyn PrivateKey>]
pub fn root_keys(&self) -> &[Box<dyn PrivateKey>]
Return all the loaded PrivateKeys for the root metadata.
Sourcepub fn targets_keys(&self) -> &[Box<dyn PrivateKey>]
pub fn targets_keys(&self) -> &[Box<dyn PrivateKey>]
Return all the loaded PrivateKeys for the targets metadata.
Sourcepub fn snapshot_keys(&self) -> &[Box<dyn PrivateKey>]
pub fn snapshot_keys(&self) -> &[Box<dyn PrivateKey>]
Return all the loaded PrivateKeys for the snapshot metadata.
Sourcepub fn timestamp_keys(&self) -> &[Box<dyn PrivateKey>]
pub fn timestamp_keys(&self) -> &[Box<dyn PrivateKey>]
Return all the loaded PrivateKeys for the timestamp metadata.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RepoKeys
impl !RefUnwindSafe for RepoKeys
impl !Send for RepoKeys
impl !Sync for RepoKeys
impl Unpin for RepoKeys
impl UnsafeUnpin for RepoKeys
impl !UnwindSafe for RepoKeys
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