pub struct SnapshotMetadata { /* private fields */ }Expand description
Metadata for the snapshot role.
Implementations§
Source§impl SnapshotMetadata
impl SnapshotMetadata
Sourcepub fn new(
version: u32,
expires: DateTime<Utc>,
meta: HashMap<MetadataPath, MetadataDescription<TargetsMetadata>>,
additional_fields: HashMap<String, Value>,
) -> Result<Self>
pub fn new( version: u32, expires: DateTime<Utc>, meta: HashMap<MetadataPath, MetadataDescription<TargetsMetadata>>, additional_fields: HashMap<String, Value>, ) -> Result<Self>
Create new SnapshotMetadata.
Sourcepub fn meta(
&self,
) -> &HashMap<MetadataPath, MetadataDescription<TargetsMetadata>>
pub fn meta( &self, ) -> &HashMap<MetadataPath, MetadataDescription<TargetsMetadata>>
An immutable reference to the metadata paths and descriptions.
Sourcepub fn additional_fields(&self) -> &HashMap<String, Value>
pub fn additional_fields(&self) -> &HashMap<String, Value>
An immutable reference to any additional fields on the metadata.
Trait Implementations§
Source§impl Clone for SnapshotMetadata
impl Clone for SnapshotMetadata
Source§fn clone(&self) -> SnapshotMetadata
fn clone(&self) -> SnapshotMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnapshotMetadata
impl Debug for SnapshotMetadata
Source§impl<'de> Deserialize<'de> for SnapshotMetadata
impl<'de> Deserialize<'de> for SnapshotMetadata
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SnapshotMetadata
Source§impl From<SnapshotMetadata> for SnapshotMetadataBuilder
impl From<SnapshotMetadata> for SnapshotMetadataBuilder
Source§fn from(meta: SnapshotMetadata) -> Self
fn from(meta: SnapshotMetadata) -> Self
Converts to this type from the input type.
Source§impl Metadata for SnapshotMetadata
impl Metadata for SnapshotMetadata
Source§impl PartialEq for SnapshotMetadata
impl PartialEq for SnapshotMetadata
Source§fn eq(&self, other: &SnapshotMetadata) -> bool
fn eq(&self, other: &SnapshotMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SnapshotMetadata
impl Serialize for SnapshotMetadata
impl StructuralPartialEq for SnapshotMetadata
Auto Trait Implementations§
impl Freeze for SnapshotMetadata
impl RefUnwindSafe for SnapshotMetadata
impl Send for SnapshotMetadata
impl Sync for SnapshotMetadata
impl Unpin for SnapshotMetadata
impl UnsafeUnpin for SnapshotMetadata
impl UnwindSafe for SnapshotMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.