[−][src]Trait polyfuse::bytes::Bytes
A trait that represents a collection of bytes.
The role of this trait is similar to Buf
provided by bytes
crate,
but it focuses on the situation where all byte chunks are written in a single
operation.
This difference is due to the requirement of FUSE kernel driver that all data in
a reply message must be passed in a single write(2)
syscall.
Required methods
pub fn size(&self) -> usize
[src]
Return the total amount of bytes contained in this data.
pub fn count(&self) -> usize
[src]
Return the number of byte chunks.
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
Fill with potentially multiple slices in this data.
This method corresonds to Buf::bytes_vectored
, except that
the number of byte chunks is acquired from Bytes::count
and the implementation
needs to add all chunks in dst
.
Implementations on Foreign Types
impl<R: ?Sized, '_> Bytes for &'_ R where
R: Bytes,
[src]
R: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<R: ?Sized, '_> Bytes for &'_ mut R where
R: Bytes,
[src]
R: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<R: ?Sized> Bytes for Box<R> where
R: Bytes,
[src]
R: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<R: ?Sized> Bytes for Rc<R> where
R: Bytes,
[src]
R: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<R: ?Sized> Bytes for Arc<R> where
R: Bytes,
[src]
R: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl Bytes for ()
[src]
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, _: &mut dyn FillBytes<'a>)
[src]
impl Bytes for [u8; 0]
[src]
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, _: &mut dyn FillBytes<'a>)
[src]
impl<T1> Bytes for (T1,) where
T1: Bytes,
[src]
T1: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<T1, T2> Bytes for (T1, T2) where
T1: Bytes,
T2: Bytes,
[src]
T1: Bytes,
T2: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<T1, T2, T3> Bytes for (T1, T2, T3) where
T1: Bytes,
T2: Bytes,
T3: Bytes,
[src]
T1: Bytes,
T2: Bytes,
T3: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<T1, T2, T3, T4> Bytes for (T1, T2, T3, T4) where
T1: Bytes,
T2: Bytes,
T3: Bytes,
T4: Bytes,
[src]
T1: Bytes,
T2: Bytes,
T3: Bytes,
T4: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<T1, T2, T3, T4, T5> Bytes for (T1, T2, T3, T4, T5) where
T1: Bytes,
T2: Bytes,
T3: Bytes,
T4: Bytes,
T5: Bytes,
[src]
T1: Bytes,
T2: Bytes,
T3: Bytes,
T4: Bytes,
T5: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<R> Bytes for [R] where
R: Bytes,
[src]
R: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<R> Bytes for Vec<R> where
R: Bytes,
[src]
R: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<T> Bytes for Option<T> where
T: Bytes,
[src]
T: Bytes,
pub fn size(&self) -> usize
[src]
pub fn count(&self) -> usize
[src]
pub fn fill_bytes<'a>(&'a self, dst: &mut dyn FillBytes<'a>)
[src]
impl<L, R> Bytes for Either<L, R> where
L: Bytes,
R: Bytes,
[src]
L: Bytes,
R: Bytes,