pub struct TargetsMetadata { /* private fields */ }Expand description
Metadata for the targets role.
Implementations§
Source§impl TargetsMetadata
impl TargetsMetadata
Sourcepub fn new(
version: u32,
expires: DateTime<Utc>,
targets: HashMap<TargetPath, TargetDescription>,
delegations: Delegations,
additional_fields: HashMap<String, Value>,
) -> Result<Self>
pub fn new( version: u32, expires: DateTime<Utc>, targets: HashMap<TargetPath, TargetDescription>, delegations: Delegations, additional_fields: HashMap<String, Value>, ) -> Result<Self>
Create new TargetsMetadata.
Sourcepub fn targets(&self) -> &HashMap<TargetPath, TargetDescription>
pub fn targets(&self) -> &HashMap<TargetPath, TargetDescription>
An immutable reference to the descriptions of targets.
Sourcepub fn delegations(&self) -> &Delegations
pub fn delegations(&self) -> &Delegations
An immutable reference to the optional delegations.
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 TargetsMetadata
impl Clone for TargetsMetadata
Source§fn clone(&self) -> TargetsMetadata
fn clone(&self) -> TargetsMetadata
Returns a duplicate of the value. Read more
1.0.0 · 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 TargetsMetadata
impl Debug for TargetsMetadata
Source§impl<'de> Deserialize<'de> for TargetsMetadata
impl<'de> Deserialize<'de> for TargetsMetadata
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
Source§impl Metadata for TargetsMetadata
impl Metadata for TargetsMetadata
Source§impl PartialEq for TargetsMetadata
impl PartialEq for TargetsMetadata
Source§impl Serialize for TargetsMetadata
impl Serialize for TargetsMetadata
impl Eq for TargetsMetadata
impl StructuralPartialEq for TargetsMetadata
Auto Trait Implementations§
impl Freeze for TargetsMetadata
impl RefUnwindSafe for TargetsMetadata
impl Send for TargetsMetadata
impl Sync for TargetsMetadata
impl Unpin for TargetsMetadata
impl UnsafeUnpin for TargetsMetadata
impl UnwindSafe for TargetsMetadata
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