Trait capnp_rpc::VatNetwork

source ·
pub trait VatNetwork<VatId> {
    // Required methods
    fn connect(&mut self, host_id: VatId) -> Option<Box<dyn Connection<VatId>>>;
    fn accept(&mut self) -> Promise<Box<dyn Connection<VatId>>, Error>;
    fn drive_until_shutdown(&mut self) -> Promise<(), Error>;
}

Required Methods§

source

fn connect(&mut self, host_id: VatId) -> Option<Box<dyn Connection<VatId>>>

Returns None if hostId refers to the local vat.

source

fn accept(&mut self) -> Promise<Box<dyn Connection<VatId>>, Error>

Waits for the next incoming connection and return it.

source

fn drive_until_shutdown(&mut self) -> Promise<(), Error>

Implementors§

source§

impl<T> VatNetwork<Side> for VatNetwork<T>
where T: AsyncRead + Unpin,