pub struct TimestampMetadataBuilder { /* private fields */ }Expand description
Helper to construct TimestampMetadata.
Implementations§
Source§impl TimestampMetadataBuilder
impl TimestampMetadataBuilder
Sourcepub fn from_snapshot<D>(
snapshot: &SignedMetadata<D, SnapshotMetadata>,
hash_algs: &[HashAlgorithm],
) -> Result<Self>where
D: Pouf,
pub fn from_snapshot<D>(
snapshot: &SignedMetadata<D, SnapshotMetadata>,
hash_algs: &[HashAlgorithm],
) -> Result<Self>where
D: Pouf,
Create a new TimestampMetadataBuilder from a given snapshot. It defaults to:
- version: 1
- expires: 1 day from the current time.
Sourcepub fn from_metadata_description(
description: MetadataDescription<SnapshotMetadata>,
) -> Self
pub fn from_metadata_description( description: MetadataDescription<SnapshotMetadata>, ) -> Self
Create a new TimestampMetadataBuilder from a given
MetadataDescription. It defaults to:
- version: 1
- expires: 1 day from the current time.
Sourcepub fn build(self) -> Result<TimestampMetadata>
pub fn build(self) -> Result<TimestampMetadata>
Construct a new TimestampMetadata.
Sourcepub fn signed<D>(
self,
private_key: &dyn PrivateKey,
) -> Result<SignedMetadata<D, TimestampMetadata>>where
D: Pouf,
pub fn signed<D>(
self,
private_key: &dyn PrivateKey,
) -> Result<SignedMetadata<D, TimestampMetadata>>where
D: Pouf,
Construct a new SignedMetadata<D, TimestampMetadata>.
Auto Trait Implementations§
impl Freeze for TimestampMetadataBuilder
impl RefUnwindSafe for TimestampMetadataBuilder
impl Send for TimestampMetadataBuilder
impl Sync for TimestampMetadataBuilder
impl Unpin for TimestampMetadataBuilder
impl UnwindSafe for TimestampMetadataBuilder
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