[][src]Struct rpki::manifest::Manifest

pub struct Manifest { /* fields omitted */ }

A decoded RPKI manifest.

This type represents a manifest decoded from a source. In order to get to the manifest’s content, you need to validate it via the validate method.

Methods

impl Manifest[src]

pub fn decode<S: Source>(source: S, strict: bool) -> Result<Self, S::Err>[src]

Decodes a manifest from a source.

pub fn validate(
    self,
    cert: &ResourceCert,
    strict: bool
) -> Result<(ResourceCert, ManifestContent), ValidationError>
[src]

Validates the manifest.

You need to pass in the certificate of the issuing CA. If validation succeeds, the result will be the EE certificate of the manifest and the manifest content.

pub fn validate_at(
    self,
    cert: &ResourceCert,
    strict: bool,
    now: Time
) -> Result<(ResourceCert, ManifestContent), ValidationError>
[src]

pub fn encode_ref<'a>(&'a self) -> impl Values + 'a[src]

Returns a value encoder for a reference to the manifest.

pub fn to_captured(&self) -> Captured[src]

Returns a DER encoded Captured for this.

pub fn cert(&self) -> &Cert[src]

Returns a reference to the EE certificate of this manifest.

pub fn content(&self) -> &ManifestContent[src]

Returns a reference to the manifest content.

Methods from Deref<Target = ManifestContent>

pub fn manifest_number(&self) -> Serial[src]

Returns the manifest number.

pub fn this_update(&self) -> Time[src]

Returns the time when this manifest was created.

pub fn next_update(&self) -> Time[src]

Returns the time when the next update to the manifest should appear.

pub fn file_hash_alg(&self) -> DigestAlgorithm[src]

Returns the hash algorithm for the file list entries.

Important traits for FileListIter
pub fn iter(&self) -> FileListIter[src]

Returns an iterator over the file list.

pub fn iter_uris<'a>(
    &'a self,
    base: &'a Rsync
) -> impl Iterator<Item = (Rsync, ManifestHash)> + 'a
[src]

Returns an iterator over URL and hash pairs.

The iterator assumes that all files referred to in the manifest are relative to the given rsync URI.

pub fn len(&self) -> usize[src]

Returns the length of the file list.

pub fn is_empty(&self) -> bool[src]

Returns whether the file list is empty.

pub fn is_stale(&self) -> bool[src]

Returns whether the manifest is stale.

A manifest is stale if it’s nextUpdate time has passed.

pub fn encode_ref<'a>(&'a self) -> impl Values + 'a[src]

Returns a value encoder for a reference to the content.

Trait Implementations

impl AsRef<Manifest> for Manifest[src]

impl AsRef<ManifestContent> for Manifest[src]

impl Clone for Manifest[src]

impl Debug for Manifest[src]

impl Deref for Manifest[src]

type Target = ManifestContent

The resulting type after dereferencing.

impl Borrow<ManifestContent> for Manifest[src]

impl Serialize for Manifest[src]

impl<'de> Deserialize<'de> for Manifest[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]