pub struct Signature {
pub input: Ty,
pub output: Ty,
}Expand description
What a block accepts and produces.
Declared by the block itself, through a cf_signature export, rather than in
a sidecar file beside it. A sidecar can disagree with the code it describes
and nothing forces anyone to notice; a declaration compiled into the module
travels with it, cannot go stale, and leaves one artifact to ship rather than
two to keep in step.
Display/FromStr render and parse it as "{input} -> {output}" —
each side is a Ty, and this is the compact form the catalog caches
and a bundle manifest embeds. Splitting on " -> " is unambiguous only
because Ty::describe() never produces that substring itself.
Fields§
§input: TyWhat the block needs as input.
output: TyWhat it produces.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
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
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnsafeUnpin for Signature
impl UnwindSafe for Signature
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