#[non_exhaustive]pub struct Representation {
pub body: Bytes,
pub content_type: String,
pub headers: Vec<(String, String)>,
}Expand description
Stored representation passed to write operations.
Header persistence policy belongs to adapters. The engine treats these pairs as opaque metadata.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.body: BytesOpaque payload bytes stored verbatim.
content_type: StringMIME type recorded with the body.
headers: Vec<(String, String)>Arbitrary metadata header pairs. Header-name de-duplication and allow/deny policy belong to the adapter that constructs this struct.
Browser-facing adapters apply their own filtering because clients may execute metadata as policy. Other adapters may pass headers through as opaque key-value metadata.
Implementations§
Auto Trait Implementations§
impl !Freeze for Representation
impl RefUnwindSafe for Representation
impl Send for Representation
impl Sync for Representation
impl Unpin for Representation
impl UnsafeUnpin for Representation
impl UnwindSafe for Representation
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