pub struct Node { /* private fields */ }Expand description
Fluent builder for a single node declaration.
Implementations§
Source§impl Node
impl Node
Sourcepub fn ty<T: 'static>(self) -> Self
pub fn ty<T: 'static>(self) -> Self
Set the concrete node type using a real Rust type T.
This avoids calling syn::parse_quote! at the call site.
Sourcepub fn in_ports(self, n: usize) -> Self
pub fn in_ports(self, n: usize) -> Self
Set the number of input ports for this node.
If in_ports == 0 and out_ports > 0, the node will be treated as a
source by codegen.
Sourcepub fn out_ports(self, n: usize) -> Self
pub fn out_ports(self, n: usize) -> Self
Set the number of output ports for this node.
If out_ports == 0 and in_ports > 0, the node will be treated as a
sink by codegen.
Sourcepub fn in_payload<T: 'static>(self) -> Self
pub fn in_payload<T: 'static>(self) -> Self
Set the input payload type using a Rust type T.
Sourcepub fn out_payload<T: 'static>(self) -> Self
pub fn out_payload<T: 'static>(self) -> Self
Set the output payload type using a Rust type T.
Sourcepub fn name(self, s: Option<&'static str>) -> Self
pub fn name(self, s: Option<&'static str>) -> Self
Set the optional node name from a Rust &'static str (or None).
Sourcepub fn ingress_policy(self, p: EdgePolicy) -> Self
pub fn ingress_policy(self, p: EdgePolicy) -> Self
Supply a concrete EdgePolicy value for ingress policy (converted internally).
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl !Send for Node
impl !Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
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