Struct safe_http_async::BodyBox
source · [−]pub struct BodyBox { /* private fields */ }
Implementations
sourceimpl BodyBox
impl BodyBox
pub fn new<B>(body: B) -> Self where
B: Body + Debug + Unpin + Send + Sync + 'static,
pub fn empty() -> Self
pub async fn read_chunk(&mut self, buf: &mut [u8]) -> Result<usize>
pub async fn chunk_size_hint(&mut self) -> Result<(usize, Option<usize>)>
pub fn size_hint(&self) -> (usize, Option<usize>)
pub async fn read_chunk_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize>
pub async fn read_chunk_vec(&mut self) -> Result<Vec<u8>>
pub fn from_bytes(bytes: Vec<u8>) -> Self
pub async fn read_vec(&mut self) -> Result<Vec<u8>>
pub async fn read_into_vec(self) -> Result<Vec<u8>>
pub fn from_string(string: String) -> Self
pub async fn read_string(&mut self) -> Result<String>
pub async fn read_into_string(self) -> Result<String>
Trait Implementations
sourceimpl From<&'static [u8]> for BodyBox
impl From<&'static [u8]> for BodyBox
sourcefn from(x: &'static [u8]) -> Self
fn from(x: &'static [u8]) -> Self
Performs the conversion.
sourceimpl From<Infallible> for BodyBox
impl From<Infallible> for BodyBox
sourcefn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Performs the conversion.
sourcefn from(x: SharedBytes) -> Self
fn from(x: SharedBytes) -> Self
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for BodyBox
impl Send for BodyBox
impl Sync for BodyBox
impl Unpin for BodyBox
impl !UnwindSafe for BodyBox
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more