[−][src]Trait enclave_runner::usercalls::SyncStream
This trait is mostly same as std::io::Read
+ std::io::Write
except that it takes an immutable reference to the source.
Required methods
fn read(&self, buf: &mut [u8]) -> IoResult<usize>
Same as std::io::Read::read
, except that it takes an immutable reference to the source.
fn write(&self, buf: &[u8]) -> IoResult<usize>
Same as std::io::Write::write
, except that it takes an immutable reference to the source.
fn flush(&self) -> IoResult<()>
Same as std::io::Write::flush
, except that it takes an immutable reference to the source.
Provided methods
fn read_alloc(&self) -> IoResult<Vec<u8>>
Read some data from stream, letting the callee choose the amount.