pub struct ResourceResponse {
pub status: u16,
pub mime: String,
pub body: Arc<[u8]>,
pub headers: Vec<(String, String)>,
}Expand description
An immutable binary response. Cloning shares the body. GET byte ranges and HEAD are handled by the adapter. Keep responses bounded; this API buffers a resource, never an entire site.
Fields§
§status: u16§mime: String§body: Arc<[u8]>§headers: Vec<(String, String)>Implementations§
Trait Implementations§
Source§impl Clone for ResourceResponse
impl Clone for ResourceResponse
Auto Trait Implementations§
impl Freeze for ResourceResponse
impl RefUnwindSafe for ResourceResponse
impl Send for ResourceResponse
impl Sync for ResourceResponse
impl Unpin for ResourceResponse
impl UnsafeUnpin for ResourceResponse
impl UnwindSafe for ResourceResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more