Struct wasmflow_interface::ComponentSignature
source · [−]Expand description
The signature of a Wasmflow component, including its input and output types.
Fields
name: String
The name of the component.
inputs: FieldMap
The component’s inputs.
outputs: FieldMap
The component’s outputs.
Implementations
sourceimpl ComponentSignature
impl ComponentSignature
sourcepub fn new<T: AsRef<str>>(name: T) -> Self
pub fn new<T: AsRef<str>>(name: T) -> Self
Create a new ComponentSignature with the passed name.
sourcepub fn add_input(self, name: impl AsRef<str>, input_type: TypeSignature) -> Self
pub fn add_input(self, name: impl AsRef<str>, input_type: TypeSignature) -> Self
Add an input port.
sourcepub fn add_output(self, name: impl AsRef<str>, input_type: TypeSignature) -> Self
pub fn add_output(self, name: impl AsRef<str>, input_type: TypeSignature) -> Self
Add an input port.
Trait Implementations
sourceimpl Clone for ComponentSignature
impl Clone for ComponentSignature
sourcefn clone(&self) -> ComponentSignature
fn clone(&self) -> ComponentSignature
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ComponentSignature
impl Debug for ComponentSignature
sourceimpl Default for ComponentSignature
impl Default for ComponentSignature
sourcefn default() -> ComponentSignature
fn default() -> ComponentSignature
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for ComponentSignature
impl<'de> Deserialize<'de> for ComponentSignature
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<ComponentSignature> for ComponentSignature
impl PartialEq<ComponentSignature> for ComponentSignature
sourcefn eq(&self, other: &ComponentSignature) -> bool
fn eq(&self, other: &ComponentSignature) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ComponentSignature) -> bool
fn ne(&self, other: &ComponentSignature) -> bool
This method tests for !=
.
sourceimpl Serialize for ComponentSignature
impl Serialize for ComponentSignature
impl StructuralPartialEq for ComponentSignature
Auto Trait Implementations
impl RefUnwindSafe for ComponentSignature
impl Send for ComponentSignature
impl Sync for ComponentSignature
impl Unpin for ComponentSignature
impl UnwindSafe for ComponentSignature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more