pub trait WriteReady: ErrorType {
// Required method
fn write_ready(&mut self) -> Result<bool, Self::Error>;
}Expand description
Get whether a writer is ready.
This allows using a Write in a nonblocking fashion, i.e. trying to write
only when it is ready.
Required Methods§
Sourcefn write_ready(&mut self) -> Result<bool, Self::Error>
fn write_ready(&mut self) -> Result<bool, Self::Error>
Get whether the writer is ready for immediately writing.
This usually means that there is free space in the internal transmit buffer.
If this returns true, it’s guaranteed that the next call to Write::write will not block.
Implementations on Foreign Types§
Source§impl WriteReady for &mut [u8]
impl WriteReady for &mut [u8]
Source§impl WriteReady for VecDeque<u8>
Available on crate features std or alloc only.
impl WriteReady for VecDeque<u8>
Available on crate features
std or alloc only.Source§impl<T: ?Sized + WriteReady> WriteReady for &mut T
impl<T: ?Sized + WriteReady> WriteReady for &mut T
Source§impl<T: ?Sized + WriteReady> WriteReady for Box<T>
Available on crate features std or alloc only.
impl<T: ?Sized + WriteReady> WriteReady for Box<T>
Available on crate features
std or alloc only.