[][src]Struct rpki::manifest::ManifestContent

pub struct ManifestContent { /* fields omitted */ }

The content of an RPKI manifest.

Methods

impl ManifestContent[src]

pub fn new<I, FH, F, H>(
    manifest_number: Serial,
    this_update: Time,
    next_update: Time,
    file_hash_alg: DigestAlgorithm,
    iter: I
) -> Self where
    I: IntoIterator<Item = FH>,
    FH: AsRef<FileAndHash<F, H>>,
    F: AsRef<[u8]>,
    H: AsRef<[u8]>, 
[src]

pub fn into_manifest<S: Signer>(
    self,
    sigobj: SignedObjectBuilder,
    signer: &S,
    issuer_key: &S::KeyId
) -> Result<Manifest, SigningError<S::Error>>
[src]

impl ManifestContent[src]

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.

impl ManifestContent[src]

pub fn take_from<S: Source>(cons: &mut Constructed<S>) -> Result<Self, S::Err>[src]

Takes the content from the beginning of an encoded constructed value.

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<ManifestContent> for Manifest[src]

impl Clone for ManifestContent[src]

impl Debug for ManifestContent[src]

impl Borrow<ManifestContent> 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]