Struct ruyi::buf::ByteBuf
[−]
[src]
pub struct ByteBuf { /* fields omitted */ }
Methods
impl ByteBuf
[src]
fn new() -> Self
fn with_capacity(capacity: usize) -> Self
fn with_growth(growth: usize) -> Self
fn set_growth(&mut self, growth: usize)
fn len(&self) -> usize
fn read<T, R>(&mut self, read: R) -> Result<T> where
R: Fn(&mut ReadIter) -> Result<T>,
R: Fn(&mut ReadIter) -> Result<T>,
fn read_exact<T, R>(&mut self, len: usize, read_exact: R) -> Result<T> where
R: Fn(&mut ReadIter, usize) -> Result<T>,
R: Fn(&mut ReadIter, usize) -> Result<T>,
fn get<T, G>(&mut self, index: usize, get: G) -> Result<T> where
G: Fn(&mut GetIter) -> Result<T>,
G: Fn(&mut GetIter) -> Result<T>,
fn get_exact<T, G>(
&mut self,
index: usize,
len: usize,
get_exact: G
) -> Result<T> where
G: Fn(&mut GetIter, usize) -> Result<T>,
&mut self,
index: usize,
len: usize,
get_exact: G
) -> Result<T> where
G: Fn(&mut GetIter, usize) -> Result<T>,
fn set<T, S>(&mut self, index: usize, t: T, set: S) -> Result<usize> where
S: Fn(T, &mut SetIter) -> Result<usize>,
S: Fn(T, &mut SetIter) -> Result<usize>,
fn append<T, A>(&mut self, t: T, append: A) -> Result<usize> where
A: Fn(T, &mut Appender) -> Result<usize>,
A: Fn(T, &mut Appender) -> Result<usize>,
fn prepend<T, P>(&mut self, t: T, prepend: P) -> Result<usize> where
P: Fn(T, &mut Prepender) -> Result<usize>,
P: Fn(T, &mut Prepender) -> Result<usize>,
fn try_reserve_in_head(&mut self, len: usize) -> usize
fn reserve(&mut self, additional: usize)
Reserves the minimum capacity for exactly additional more bytes to be appended to
the given ByteBuf
. Does nothing if the capacity is already sufficient.
fn extend(&mut self, other: Self)
fn split_off(&mut self, at: usize) -> Result<Self>
fn drain_to(&mut self, at: usize) -> Result<Self>
fn compact(&mut self)
fn skip(&mut self, n: usize) -> usize
fn is_empty(&self) -> bool
fn read_in<R>(&mut self, r: R) -> Result<usize> where
R: Read + ReadV,
R: Read + ReadV,
fn write_out<W>(&mut self, w: W) -> Result<usize> where
W: Write + WriteV,
W: Write + WriteV,
fn as_reader(&mut self) -> Reader
fn as_writer(&mut self) -> Writer
fn as_hex_dump(&self) -> HexDump
fn bytes(&self) -> Bytes
Trait Implementations
impl Debug for ByteBuf
[src]
impl Ord for ByteBuf
[src]
fn cmp(&self, other: &Self) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for ByteBuf
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl PartialEq for ByteBuf
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.