[−][src]Struct hyper::Chunk
A piece of a message body.
These are returned by Body
. It is an efficient buffer type.
A Chunk
can be easily created by many of Rust's standard types that
represent a collection of bytes, using Chunk::from
.
Methods
impl Chunk
[src][−]
pub fn into_bytes(self) -> Bytes
[src][−]
Converts this Chunk
directly into the Bytes
type without copies.
This is simply an inherent alias for Bytes::from(chunk)
, which exists,
but doesn't appear in rustdocs.
Trait Implementations
impl AsRef<[u8]> for Chunk
[src][+]
impl IntoIterator for Chunk
[src][+]
impl Default for Chunk
[src][+]
impl Extend<u8> for Chunk
[src][+]
impl From<Chunk> for Body
[src][+]
impl From<Vec<u8>> for Chunk
[src][+]
impl From<&'static [u8]> for Chunk
[src][+]
impl From<String> for Chunk
[src][+]
impl From<&'static str> for Chunk
[src][+]
impl From<Bytes> for Chunk
[src][+]
impl From<Chunk> for Bytes
[src][+]
impl Debug for Chunk
[src][+]
impl Deref for Chunk
[src][+]
impl Buf for Chunk
[src][+]
Auto Trait Implementations
Blanket Implementations
impl<I> IntoIterator for I where
I: Iterator,
[src][−]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src][−]
impl<T> From for T
[src][−]
impl<T, U> Into for T where
U: From<T>,
[src][−]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src][−]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)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> Borrow for T where
T: ?Sized,
[src][−]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src][−]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src][−]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src][−]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src][−]
impl<T> Any for T where
T: 'static + ?Sized,
[src][−]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src][−]
impl<T> IntoBuf for T where
T: Buf,
[src][−]
T: Buf,