pub struct PluggableRuntimeImplementation {
pub bus: Box<dyn VirtualBus + Sync>,
pub networking: Box<dyn VirtualNetworking + Sync>,
pub thread_id_seed: AtomicU32,
}
Fields§
§bus: Box<dyn VirtualBus + Sync>
§networking: Box<dyn VirtualNetworking + Sync>
§thread_id_seed: AtomicU32
Implementations§
source§impl PluggableRuntimeImplementation
impl PluggableRuntimeImplementation
pub fn set_bus_implementation<I>(&mut self, bus: I)where
I: VirtualBus + Sync,
pub fn set_networking_implementation<I>(&mut self, net: I)where
I: VirtualNetworking + Sync,
Trait Implementations§
source§impl WasiRuntimeImplementation for PluggableRuntimeImplementation
impl WasiRuntimeImplementation for PluggableRuntimeImplementation
source§fn bus(&self) -> &dyn VirtualBus
fn bus(&self) -> &dyn VirtualBus
For WASI runtimes that support it they can implement a message BUS implementation
which allows runtimes to pass serialized messages between each other similar to
RPC’s. BUS implementation can be implemented that communicate across runtimes
thus creating a distributed computing architecture.
source§fn networking(&self) -> &dyn VirtualNetworking
fn networking(&self) -> &dyn VirtualNetworking
Provides access to all the networking related functions such as sockets.
By default networking is not implemented.
source§fn thread_generate_id(&self) -> WasiThreadId
fn thread_generate_id(&self) -> WasiThreadId
Generates a new thread ID
source§fn tty_get(&self) -> WasiTtyState
fn tty_get(&self) -> WasiTtyState
Gets the TTY state
source§fn tty_set(&self, _tty_state: WasiTtyState)
fn tty_set(&self, _tty_state: WasiTtyState)
Sets the TTY state
source§fn thread_spawn(
&self,
_callback: Box<dyn FnOnce() + Send + 'static>
) -> Result<(), WasiThreadError>
fn thread_spawn(
&self,
_callback: Box<dyn FnOnce() + Send + 'static>
) -> Result<(), WasiThreadError>
Spawns a new thread by invoking the
source§fn thread_parallelism(&self) -> Result<usize, WasiThreadError>
fn thread_parallelism(&self) -> Result<usize, WasiThreadError>
Returns the amount of parallelism that is possible on this platform
Auto Trait Implementations§
impl !RefUnwindSafe for PluggableRuntimeImplementation
impl Send for PluggableRuntimeImplementation
impl Sync for PluggableRuntimeImplementation
impl Unpin for PluggableRuntimeImplementation
impl !UnwindSafe for PluggableRuntimeImplementation
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Upcastable for Twhere
T: Any + Debug + 'static,
impl<T> Upcastable for Twhere
T: Any + Debug + 'static,
§impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref