Trait simple_stream::SSend
[−]
[src]
pub trait SSend {
fn send(&mut self, buf: &[u8]) -> Result<usize, Error>;
}The SSend trait allows for the writing of bytes to a source.
Each call to send will attempt to write bytes to the source.
Required Methods
fn send(&mut self, buf: &[u8]) -> Result<usize, Error>
Attempt to write bytes to a source, returning how many bytes were written upon success.
If the stream is in blocking mode, each call to send is
expected to write directly to the source, followed by flushing.
If the stream is in non-blocking mode, each call to send is
expected to write directly to the source until the source returns
ErrorKind::WouldBlock. At that point, the remaining bytes will
be placed into an internal queue to be written first upon the next
call.
Errors
This call will return an Error for any std::io::Error
encountered during the write.