Trait salvo_core::http::body_chunk::BodyChunk [−][src]
Required methods
fn split_into(self, idx: usize) -> (Self, Self)
[src]
Split the chunk at idx
, returning (self[..idx], self[idx..])
.
fn as_slice(&self) -> &[u8]ⓘ
[src]
Get the slice representing the data of this chunk.
Provided methods
fn slice<R>(&self, range: R) -> &R::Output where
R: SliceIndex<[u8]>,
[src]
R: SliceIndex<[u8]>,
Slice the bytes in self
according to the given range.
fn len(&self) -> usize
[src]
Equivalent to self.as_slice().len()
fn is_empty(&self) -> bool
[src]
Equivalent to self.as_slice().is_empty()
fn into_vec(self) -> Vec<u8>
[src]
Equivalent to self.as_slice().to_owned()
Implementors are welcome to override this if they can provide a cheaper conversion.