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 caller_module: Cow<'static, str>,
pub callee_module: Cow<'static, str>,
pub options: TestCaseOptions,
}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
caller_module: Cow<'static, str>Implementation of the “caller” component, which invokes the callee
composed component.
callee_module: Cow<'static, str>Implementation of the “callee” component, which invokes the host.
options: TestCaseOptionsOptions used for caller/calle ABI/etc.
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