Struct debian_packaging::repository::release::ReleaseFileEntry[][src]

pub struct ReleaseFileEntry<'a> {
    pub path: &'a str,
    pub digest: ReleaseFileDigest<'a>,
    pub size: u64,
}
Expand description

An entry for a file in a parsed Release file.

Instances correspond to a line in a MD5Sum, SHA1, or SHA256 field.

Fields

path: &'a str

The path to this file within the repository.

digest: ReleaseFileDigest<'a>

The hex digest of this file.

size: u64

The size of the file in bytes.

Implementations

Obtain the by-hash path variant for this entry.

Obtain the content digest as bytes.

pub fn to_contents_file_entry(self) -> Option<ContentsFileEntry<'a>>

Attempt to convert this instance to a ContentsFileEntry.

Resolves to Some if the conversion succeeded or None if this (likely) isn’t a Contents* file.

pub fn to_packages_file_entry(self) -> Option<PackagesFileEntry<'a>>

Attempt to convert this instance to a PackagesFileEntry.

Resolves to Some if the conversion succeeded or None if this (likely) isn’t a Packages* file.

pub fn to_sources_file_entry(self) -> Option<SourcesFileEntry<'a>>

Attempt to convert this instance to a SourcesFileEntry.

Resolves to Some if the conversion succeeded or None if this (likely) isn’t a Sources file.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more