Trait wasm_component_layer::ComponentType
source · pub trait ComponentType: 'static + Sized {
// Required methods
fn ty() -> ValueType;
fn from_value(value: &Value) -> Result<Self>;
fn into_value(self) -> Result<Value>;
}
Expand description
A type which can convert itself to and from component model values.
Required Methods§
sourcefn from_value(value: &Value) -> Result<Self>
fn from_value(value: &Value) -> Result<Self>
Attempts to create an instance of Self
from a component model value.
sourcefn into_value(self) -> Result<Value>
fn into_value(self) -> Result<Value>
Attempts to convert Self
into a component model value.