pub struct Declarations {
pub types: Cow<'static, str>,
pub type_instantiation_args: Cow<'static, str>,
pub params: Cow<'static, str>,
pub results: Cow<'static, str>,
pub import_and_export: Cow<'static, str>,
pub encoding1: StringEncoding,
pub encoding2: StringEncoding,
}Expand description
Represents custom fragments of a WAT file which may be used to create a component for exercising TestCases
Fields§
§types: Cow<'static, str>Type declarations (if any) referenced by params and/or result
type_instantiation_args: Cow<'static, str>Types to thread through when instantiating sub-components.
params: Cow<'static, str>Parameter declarations used for the imported and exported functions
results: Cow<'static, str>Result declaration used for the imported and exported functions
import_and_export: Cow<'static, str>A WAT fragment representing the core function import and export to use for testing
encoding1: StringEncodingString encoding to use for host -> component
encoding2: StringEncodingString encoding to use for component -> host
Implementations§
Source§impl Declarations
impl Declarations
Sourcepub fn make_component(&self) -> Box<str>
pub fn make_component(&self) -> Box<str>
Generate a complete WAT file based on the specified fragments.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Declarations
impl RefUnwindSafe for Declarations
impl Send for Declarations
impl Sync for Declarations
impl Unpin for Declarations
impl UnwindSafe for Declarations
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
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 more