pub struct Manifest { /* private fields */ }
Expand description
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.
Implementations
sourceimpl Manifest
impl Manifest
sourcepub fn decode<S: Source>(source: S, strict: bool) -> Result<Self, S::Err>
pub fn decode<S: Source>(source: S, strict: bool) -> Result<Self, S::Err>
Decodes a manifest from a source.
sourcepub fn validate(
self,
cert: &ResourceCert,
strict: bool
) -> Result<(ResourceCert, ManifestContent), ValidationError>
pub fn validate(
self,
cert: &ResourceCert,
strict: bool
) -> Result<(ResourceCert, ManifestContent), ValidationError>
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>
sourcepub fn encode_ref(&self) -> impl Values + '_
pub fn encode_ref(&self) -> impl Values + '_
Returns a value encoder for a reference to the manifest.
sourcepub fn to_captured(&self) -> Captured
pub fn to_captured(&self) -> Captured
Returns a DER encoded Captured for this.
sourcepub fn content(&self) -> &ManifestContent
pub fn content(&self) -> &ManifestContent
Returns a reference to the manifest content.
Methods from Deref<Target = ManifestContent>
sourcepub fn manifest_number(&self) -> Serial
pub fn manifest_number(&self) -> Serial
Returns the manifest number.
sourcepub fn this_update(&self) -> Time
pub fn this_update(&self) -> Time
Returns the time when this manifest was created.
sourcepub fn next_update(&self) -> Time
pub fn next_update(&self) -> Time
Returns the time when the next update to the manifest should appear.
sourcepub fn file_hash_alg(&self) -> DigestAlgorithm
pub fn file_hash_alg(&self) -> DigestAlgorithm
Returns the hash algorithm for the file list entries.
sourcepub fn iter(&self) -> FileListIterⓘNotable traits for FileListIterimpl Iterator for FileListIter type Item = FileAndHash<Bytes, Bytes>;
pub fn iter(&self) -> FileListIterⓘNotable traits for FileListIterimpl Iterator for FileListIter type Item = FileAndHash<Bytes, Bytes>;
Returns an iterator over the file list.
sourcepub fn encode_ref(&self) -> impl Values + '_
pub fn encode_ref(&self) -> impl Values + '_
Returns a value encoder for a reference to the content.
Trait Implementations
sourceimpl AsRef<ManifestContent> for Manifest
impl AsRef<ManifestContent> for Manifest
sourcefn as_ref(&self) -> &ManifestContent
fn as_ref(&self) -> &ManifestContent
Performs the conversion.
sourceimpl Borrow<ManifestContent> for Manifest
impl Borrow<ManifestContent> for Manifest
sourcefn borrow(&self) -> &ManifestContent
fn borrow(&self) -> &ManifestContent
Immutably borrows from an owned value. Read more
sourceimpl Deref for Manifest
impl Deref for Manifest
type Target = ManifestContent
type Target = ManifestContent
The resulting type after dereferencing.
sourceimpl<'de> Deserialize<'de> for Manifest
impl<'de> Deserialize<'de> for Manifest
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Manifest
impl Send for Manifest
impl Sync for Manifest
impl Unpin for Manifest
impl UnwindSafe for Manifest
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more