[−][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
[src]
impl Send for Body
[src]
impl Sync for Body
[src]
impl Unpin for Body
[src]
impl UnwindSafe for Body
[src]
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,
pub 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.
pub 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>,