Struct wick_interface_types::OperationSignature
source · #[non_exhaustive]pub struct OperationSignature {
pub name: String,
pub config: Vec<Field>,
pub inputs: Vec<Field>,
pub outputs: Vec<Field>,
}
Expand description
The signature of a Wick component, including its input and output types.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The name of the component.
config: Vec<Field>
The operation’s configuration.
inputs: Vec<Field>
The component’s inputs.
outputs: Vec<Field>
The component’s outputs.
Implementations§
source§impl OperationSignature
impl OperationSignature
pub fn new<T: Into<String>>( name: T, inputs: Vec<Field>, outputs: Vec<Field>, config: Vec<Field> ) -> Self
sourcepub fn new_named<T: Into<String>>(name: T) -> Self
pub fn new_named<T: Into<String>>(name: T) -> Self
Create a new OperationSignature with the passed name.
sourcepub fn add_output<T: Into<String>>(self, name: T, ty: Type) -> Self
pub fn add_output<T: Into<String>>(self, name: T, ty: Type) -> Self
Add an input port.
Trait Implementations§
source§impl Clone for OperationSignature
impl Clone for OperationSignature
source§fn clone(&self) -> OperationSignature
fn clone(&self) -> OperationSignature
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 OperationSignature
impl Debug for OperationSignature
source§impl Default for OperationSignature
impl Default for OperationSignature
source§fn default() -> OperationSignature
fn default() -> OperationSignature
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for OperationSignature
impl<'de> Deserialize<'de> for OperationSignature
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<OperationSignature> for OperationSignature
impl PartialEq<OperationSignature> for OperationSignature
source§impl Serialize for OperationSignature
impl Serialize for OperationSignature
impl Eq for OperationSignature
impl StructuralEq for OperationSignature
Auto Trait Implementations§
impl RefUnwindSafe for OperationSignature
impl Send for OperationSignature
impl Sync for OperationSignature
impl Unpin for OperationSignature
impl UnwindSafe for OperationSignature
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.