pub struct WasmHostApi { /* private fields */ }Implementations§
Source§impl WasmHostApi
impl WasmHostApi
pub fn new(tx: Sender<WasmHostCall>) -> Self
pub async fn point(&self) -> Result<Point, DefaultHostErr>
pub async fn init(&self) -> Result<(), DefaultHostErr>
pub async fn create_mechtron(&self, cmd: HostCmd) -> Result<(), DefaultHostErr>
pub fn write_string<S: ToString>( &self, string: S, ) -> Result<i32, DefaultHostErr>
pub fn consume_string(&self, buffer_id: i32) -> Result<String, DefaultHostErr>
pub fn write_buffer(&self, buffer: Vec<u8>) -> Result<i32, DefaultHostErr>
pub fn consume_buffer(&self, buffer_id: i32) -> Result<Vec<u8>, DefaultHostErr>
pub fn wave_to_host( &self, buffer_id: i32, ) -> Result<Option<UltraWave>, DefaultHostErr>
pub fn serialize_wave_to_guest( &self, wave: UltraWave, ) -> Result<i32, DefaultHostErr>
pub fn guest_consume_wave( &self, wave: i32, ) -> Result<Option<UltraWave>, DefaultHostErr>
pub fn transmit_to_guest( &self, wave: UltraWave, ) -> Result<Option<UltraWave>, DefaultHostErr>
pub fn host_mechtron(&self, cmd: HostCmd)
Trait Implementations§
Source§impl Clone for WasmHostApi
impl Clone for WasmHostApi
Source§fn clone(&self) -> WasmHostApi
fn clone(&self) -> WasmHostApi
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl WasmerEnv for WasmHostApi
impl WasmerEnv for WasmHostApi
Source§fn init_with_instance(
&mut self,
instance: &Instance,
) -> Result<(), HostEnvInitError>
fn init_with_instance( &mut self, instance: &Instance, ) -> Result<(), HostEnvInitError>
The function that Wasmer will call on your type to let it finish
setting up the environment with data from the
Instance. Read moreAuto Trait Implementations§
impl Freeze for WasmHostApi
impl RefUnwindSafe for WasmHostApi
impl Send for WasmHostApi
impl Sync for WasmHostApi
impl Unpin for WasmHostApi
impl UnwindSafe for WasmHostApi
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§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.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more
Source§impl<T> Upcastable for T
impl<T> Upcastable for T
Source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
Source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref