pub struct WriteBuf { /* private fields */ }
Implementations§
Source§impl WriteBuf
impl WriteBuf
pub fn new() -> WriteBuf
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn into_inner(self) -> BytesMut
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
clear remaining bytes in buffer and set flush flag to false. this would make following BufInterest::want_write_io call return false.
pub fn buf(&self) -> &[u8] ⓘ
Trait Implementations§
Source§impl BufInterest for WriteBuf
impl BufInterest for WriteBuf
Source§fn want_write_buf(&self) -> bool
fn want_write_buf(&self) -> bool
flag if buffer want more data to be filled in.
Source§fn want_write_io(&self) -> bool
fn want_write_io(&self) -> bool
flag if buffer want to write data to io.
Source§impl BufWrite for WriteBuf
impl BufWrite for WriteBuf
Auto Trait Implementations§
impl Freeze for WriteBuf
impl RefUnwindSafe for WriteBuf
impl Send for WriteBuf
impl Sync for WriteBuf
impl Unpin for WriteBuf
impl UnwindSafe for WriteBuf
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more