Browse Source

uniform view trait

pull/6391/head
Pat Hickey 2 years ago
parent
commit
544db7e9a3
  1. 10
      host/src/main.rs

10
host/src/main.rs

@ -101,10 +101,16 @@ async fn main() -> Result<()> {
.inherit_network(cap_std::ambient_authority())
.build();
impl WasiSocketsView for CommandCtx {
fn table(&mut self) -> &mut Table {
fn table(&self) -> &Table {
&self.table
}
fn table_mut(&mut self) -> &mut Table {
&mut self.table
}
fn ctx(&mut self) -> &mut WasiSocketsCtx {
fn ctx(&self) -> &WasiSocketsCtx {
&self.sockets
}
fn ctx_mut(&mut self) -> &mut WasiSocketsCtx {
&mut self.sockets
}
}

Loading…
Cancel
Save