[][src]Trait enclave_runner::usercalls::SyncStream

pub trait SyncStream: 'static + Send + Sync {
    fn read(&self, buf: &mut [u8]) -> IoResult<usize>;
fn write(&self, buf: &[u8]) -> IoResult<usize>;
fn flush(&self) -> IoResult<()>; fn read_alloc(&self) -> IoResult<Vec<u8>> { ... } }

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.

Loading content...

Provided methods

fn read_alloc(&self) -> IoResult<Vec<u8>>

Read some data from stream, letting the callee choose the amount.

Loading content...

Implementors

impl<S: 'static + Send + Sync> SyncStream for S where
    &'a S: Read + Write
[src]

Loading content...