Struct drawbridge::types::Meta
source · pub struct Meta {
pub hash: ContentDigest,
pub size: u64,
pub mime: Mime,
}
Fields§
§hash: ContentDigest
§size: u64
§mime: Mime
Trait Implementations§
source§impl<'de> Deserialize<'de> for Meta
impl<'de> Deserialize<'de> for Meta
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Meta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Meta, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<B> FromRequest<B> for Metawhere
B: Send,
impl<B> FromRequest<B> for Metawhere
B: Send,
§type Rejection = TypedHeaderRejection
type Rejection = TypedHeaderRejection
If the extractor fails it’ll use this “rejection” type. A rejection is
a kind of error that can be converted into a response.
source§fn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>
) -> Pin<Box<dyn Future<Output = Result<Meta, <Meta as FromRequest<B>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
Meta: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'life0 mut RequestParts<B>
) -> Pin<Box<dyn Future<Output = Result<Meta, <Meta as FromRequest<B>>::Rejection>> + Send + 'async_trait>>where
'life0: 'async_trait,
Meta: 'async_trait,
Perform the extraction.
source§impl IntoResponseParts for Meta
impl IntoResponseParts for Meta
§type Error = Response<UnsyncBoxBody<Bytes, Error>>
type Error = Response<UnsyncBoxBody<Bytes, Error>>
The type returned in the event of an error. Read more
source§fn into_response_parts(
self,
res: ResponseParts
) -> Result<ResponseParts, <Meta as IntoResponseParts>::Error>
fn into_response_parts( self, res: ResponseParts ) -> Result<ResponseParts, <Meta as IntoResponseParts>::Error>
Set parts of the response
source§impl PartialEq for Meta
impl PartialEq for Meta
source§impl Serialize for Meta
impl Serialize for Meta
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Meta
impl StructuralPartialEq for Meta
Auto Trait Implementations§
impl Freeze for Meta
impl RefUnwindSafe for Meta
impl Send for Meta
impl Sync for Meta
impl Unpin for Meta
impl UnwindSafe for Meta
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more