Struct stateroom_wasm_host::WasmHost
source · pub struct WasmHost { /* private fields */ }
Expand description
Hosts a stateroom::StateroomService implemented by a WebAssembly module.
Implementations§
Trait Implementations§
source§impl StateroomService for WasmHost
impl StateroomService for WasmHost
source§fn message(&mut self, client: ClientId, message: &str)
fn message(&mut self, client: ClientId, message: &str)
Called each time a client sends a text message to the service.
source§fn disconnect(&mut self, client: ClientId)
fn disconnect(&mut self, client: ClientId)
Called each time a client disconnects from the service, unless that disconnection
will cause the service to be destroyed.
source§fn timer(&mut self)
fn timer(&mut self)
Called when StateroomContext::set_timer has been called on this service’s context,
after the provided duration.
Auto Trait Implementations§
impl !RefUnwindSafe for WasmHost
impl Send for WasmHost
impl Sync for WasmHost
impl Unpin for WasmHost
impl !UnwindSafe for WasmHost
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where T: AsFilelike,
Query the “status” flags for the
self
file descriptor.