EnclaveComm

Trait EnclaveComm 

Source
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§

Source

fn init() -> Self

Instantiate the communication channel

Provided Methods§

Source

fn read(&mut self) -> Result<MsgFromHost, MsgError>

Read a message from the host

Source

fn write(&mut self, msg: &MsgToHost)

Write a message to the host

Source

fn write_err(&mut self, err: &str)

A factory function for writing errors back to the host.

Source

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.

Implementors§