pub struct WasmHost {
pub transmitter: ProtoTransmitter,
/* private fields */
}Fields§
§transmitter: ProtoTransmitterImplementations§
Source§impl WasmHost
impl WasmHost
pub fn init(&self) -> Result<(), DefaultHostErr>
pub fn wave_to_host( &self, wave: UltraWave, ) -> Result<Option<UltraWave>, DefaultHostErr>
pub fn deserialize_wave_to_host( &self, wave: i32, ) -> Result<UltraWave, DefaultHostErr>
pub fn serialize_wave_to_guest( &self, wave: UltraWave, ) -> Result<i32, DefaultHostErr>
pub fn route(&self, wave: UltraWave) -> Result<i32, DefaultHostErr>
pub fn write_string<S: ToString>( &self, string: S, ) -> Result<i32, DefaultHostErr>
pub fn write_buffer(&self, bytes: &Vec<u8>) -> Result<i32, DefaultHostErr>
pub fn read_buffer(&self, buffer_id: i32) -> Result<Vec<u8>, DefaultHostErr>
pub fn read_string(&self, buffer_id: i32) -> Result<String, DefaultHostErr>
pub fn consume_string(&self, buffer_id: i32) -> Result<String, DefaultHostErr>
pub fn consume_buffer(&self, buffer_id: i32) -> Result<Vec<u8>, DefaultHostErr>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WasmHost
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> 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