pub struct EtaggedRawResponse<'a> {
    pub data: Box<dyn Read + 'a>,
    pub is_etag_match: bool,
    pub etag: EntityTag,
    pub file_name: String,
    pub content_type: Option<Mime>,
    pub content_length: Option<u64>,
}
Expand description

The response struct used for responding raw data with Etag cache.

Fields

data: Box<dyn Read + 'a>is_etag_match: booletag: EntityTagfile_name: Stringcontent_type: Option<Mime>content_length: Option<u64>

Implementations

Create a EtaggedRawResponse instance from a path of a file.

Create a EtaggedRawResponse instance from a Vec.

Create a EtaggedRawResponse instance from a reader.

Create a new EtagMap instance.

Trait Implementations

Formats the value using the given formatter. Read more
Returns Ok if a Response could be generated successfully. Otherwise, returns an Err with a failing Status. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts self into a collection.
Should always be Self
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.
Get the TypeId of this object.