pub trait EnclaveComm: FramedBytes {
// Required method
fn init() -> Self;
// Provided methods
fn read(&mut self) -> Result<MsgFromHost, MsgError> { ... }
fn write(&mut self, msg: &MsgToHost) { ... }
fn write_err(&mut self, err: &str) { ... }
fn write_client_err(&mut self, err: &str) { ... }
}Expand description
High level methods for the enclave to communicate with its host and clients.
Required Methods§
Provided Methods§
Sourcefn read(&mut self) -> Result<MsgFromHost, MsgError>
fn read(&mut self) -> Result<MsgFromHost, MsgError>
Read a message from the host
Sourcefn write_client_err(&mut self, err: &str)
fn write_client_err(&mut self, err: &str)
A factory function for writing errors back to a client.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.