[−][src]Enum conduit::Body
A type representing a Response
body.
This type is intended exclusively for use as part of a Response<Body>
.
Each conduit server provides its own request type that implements
RequestExt
which provides the request body as a &'a mut dyn Read
.
Variants
Static(&'static [u8])
File(File)
Implementations
impl Body
[src]
pub fn empty() -> Self
[src]
Create a new Body
from an empty static slice.
pub fn from_static(bytes: &'static [u8]) -> Self
[src]
Create a new Body
from the provided static byte slice.
pub fn from_vec(bytes: Vec<u8>) -> Self
[src]
Create a new Body
by taking ownership of the provided bytes.
Auto Trait Implementations
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnwindSafe for Body
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,