Trait salvo::http::BodyChunk [−][src]
pub trait BodyChunk {
fn split_into(self, idx: usize) -> (Self, Self);
fn as_slice(&self) -> &[u8]ⓘ;
fn slice<R>(&self, range: R) -> &<R as SliceIndex<[u8]>>::Output
where
R: SliceIndex<[u8]>,
{ ... }
fn len(&self) -> usize { ... }
fn is_empty(&self) -> bool { ... }
fn into_vec(self) -> Vec<u8, Global> { ... }
}
Required methods
fn split_into(self, idx: usize) -> (Self, Self)
fn split_into(self, idx: usize) -> (Self, Self)
Split the chunk at idx
, returning (self[..idx], self[idx..])
.
Provided methods
Slice the bytes in self
according to the given range.