pub struct ComponentSignature {
pub name: String,
pub inputs: FieldMap,
pub outputs: FieldMap,
}
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§
Source§impl 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§
Source§impl Clone for ComponentSignature
impl Clone for ComponentSignature
Source§fn clone(&self) -> ComponentSignature
fn clone(&self) -> ComponentSignature
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ComponentSignature
impl Debug for ComponentSignature
Source§impl Default for ComponentSignature
impl Default for ComponentSignature
Source§fn default() -> ComponentSignature
fn default() -> ComponentSignature
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ComponentSignature
impl<'de> Deserialize<'de> for ComponentSignature
Source§fn 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
Source§impl PartialEq for ComponentSignature
impl PartialEq for ComponentSignature
Source§impl Serialize for ComponentSignature
impl Serialize for ComponentSignature
impl StructuralPartialEq for ComponentSignature
Auto Trait Implementations§
impl Freeze for ComponentSignature
impl RefUnwindSafe for ComponentSignature
impl Send for ComponentSignature
impl Sync for ComponentSignature
impl Unpin for ComponentSignature
impl UnwindSafe for ComponentSignature
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