Skip to main content

Metadata

Trait Metadata 

Source
pub trait Metadata:
    Debug
    + PartialEq
    + Serialize
    + DeserializeOwned {
    const ROLE: Role;

    // Required methods
    fn version(&self) -> u32;
    fn expires(&self) -> &DateTime<Utc>;
}
Expand description

Top level trait used for role metadata.

Required Associated Constants§

Source

const ROLE: Role

The role associated with the metadata.

Required Methods§

Source

fn version(&self) -> u32

The version number.

Source

fn expires(&self) -> &DateTime<Utc>

An immutable reference to the metadata’s expiration DateTime.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Metadata for RootMetadata

Source§

const ROLE: Role = Role::Root

Source§

impl Metadata for SnapshotMetadata

Source§

const ROLE: Role = Role::Snapshot

Source§

impl Metadata for TargetsMetadata

Source§

const ROLE: Role = Role::Targets

Source§

impl Metadata for TimestampMetadata

Source§

const ROLE: Role = Role::Timestamp