Struct tokio_test::io::Handle [−][src]
pub struct Handle { /* fields omitted */ }
Expand description
A handle to send additional actions to the related Mock
.
Implementations
impl Handle
[src]
impl Handle
[src]pub fn read(&mut self, buf: &[u8]) -> &mut Self
[src]
pub fn read(&mut self, buf: &[u8]) -> &mut Self
[src]Sequence a read
operation.
The next operation in the mock’s script will be to expect a read
call
and return buf
.
pub fn read_error(&mut self, error: Error) -> &mut Self
[src]
pub fn read_error(&mut self, error: Error) -> &mut Self
[src]Sequence a read
operation error.
The next operation in the mock’s script will be to expect a read
call
and return error
.
pub fn write(&mut self, buf: &[u8]) -> &mut Self
[src]
pub fn write(&mut self, buf: &[u8]) -> &mut Self
[src]Sequence a write
operation.
The next operation in the mock’s script will be to expect a write
call.
pub fn write_error(&mut self, error: Error) -> &mut Self
[src]
pub fn write_error(&mut self, error: Error) -> &mut Self
[src]Sequence a write
operation error.
The next operation in the mock’s script will be to expect a write
call error.