pub struct SinkNode<S, InP, const IN: usize>{ /* private fields */ }Expand description
A thin adapter that exposes a Sink as a Node<IN, 0, InP, ()>.
Owns the sink and forwards lifecycle calls. Users do not construct this
directly — graphs can accept impl Into<SinkNode<...>> and rely on From<S>.
Implementations§
Trait Implementations§
Source§impl<S, InP, const IN: usize> From<S> for SinkNode<S, InP, IN>
Allow graphs to accept any Sink and convert implicitly.
impl<S, InP, const IN: usize> From<S> for SinkNode<S, InP, IN>
Allow graphs to accept any Sink and convert implicitly.
Source§impl<S, InP, const IN: usize> Node<IN, 0, InP, ()> for SinkNode<S, InP, IN>
impl<S, InP, const IN: usize> Node<IN, 0, InP, ()> for SinkNode<S, InP, IN>
Source§fn set_policy(&mut self, policy: NodePolicy)
fn set_policy(&mut self, policy: NodePolicy)
TEST ONLY method used to override batching policies for node contract tests.
Source§fn describe_capabilities(&self) -> NodeCapabilities
fn describe_capabilities(&self) -> NodeCapabilities
Return the node’s capability descriptor.
Source§fn input_acceptance(&self) -> [PlacementAcceptance; IN]
fn input_acceptance(&self) -> [PlacementAcceptance; IN]
Return the node’s port placement acceptances (zero-copy compatibility).
Source§fn output_acceptance(&self) -> [PlacementAcceptance; 0]
fn output_acceptance(&self) -> [PlacementAcceptance; 0]
Return the node’s output placement preferences (zero-copy compatibility).
Source§fn policy(&self) -> NodePolicy
fn policy(&self) -> NodePolicy
Return the node’s policy bundle.
Source§fn initialize<C, T>(&mut self, _c: &C, _t: &mut T) -> Result<(), NodeError>where
T: Telemetry,
fn initialize<C, T>(&mut self, _c: &C, _t: &mut T) -> Result<(), NodeError>where
T: Telemetry,
Prepare internal state, acquire buffers, and register telemetry series.
Source§fn start<C, T>(&mut self, _c: &C, _t: &mut T) -> Result<(), NodeError>where
T: Telemetry,
fn start<C, T>(&mut self, _c: &C, _t: &mut T) -> Result<(), NodeError>where
T: Telemetry,
Optional warm-up (e.g., compile kernels, prime pools). Default: no-op.
Source§fn process_message<C>(
&mut self,
msg: &Message<InP>,
_sys_clock: &C,
) -> Result<ProcessResult<()>, NodeError>where
C: PlatformClock + Sized,
fn process_message<C>(
&mut self,
msg: &Message<InP>,
_sys_clock: &C,
) -> Result<ProcessResult<()>, NodeError>where
C: PlatformClock + Sized,
Per-message processing hook. Read more
Source§fn step<'g, 't, 'ck, InQ, OutQ, InM, OutM, C, Tel>(
&mut self,
cx: &mut StepContext<'g, 't, 'ck, IN, 0, InP, (), InQ, OutQ, InM, OutM, C, Tel>,
) -> Result<StepResult, NodeError>where
InQ: Edge,
OutQ: Edge,
InM: MemoryManager<InP>,
OutM: MemoryManager<()>,
C: PlatformClock + Sized,
Tel: Telemetry + Sized,
fn step<'g, 't, 'ck, InQ, OutQ, InM, OutM, C, Tel>(
&mut self,
cx: &mut StepContext<'g, 't, 'ck, IN, 0, InP, (), InQ, OutQ, InM, OutM, C, Tel>,
) -> Result<StepResult, NodeError>where
InQ: Edge,
OutQ: Edge,
InM: MemoryManager<InP>,
OutM: MemoryManager<()>,
C: PlatformClock + Sized,
Tel: Telemetry + Sized,
Execute one cooperative step using the provided context. Read more
Source§fn step_batch<'graph, 'telemetry, 'clock, InQ, OutQ, InM, OutM, C, Tel>(
&mut self,
ctx: &mut StepContext<'graph, 'telemetry, 'clock, IN, 0, InP, (), InQ, OutQ, InM, OutM, C, Tel>,
) -> Result<StepResult, NodeError>where
InQ: Edge,
OutQ: Edge,
InM: MemoryManager<InP>,
OutM: MemoryManager<()>,
C: PlatformClock + Sized,
Tel: Telemetry + Sized,
fn step_batch<'graph, 'telemetry, 'clock, InQ, OutQ, InM, OutM, C, Tel>(
&mut self,
ctx: &mut StepContext<'graph, 'telemetry, 'clock, IN, 0, InP, (), InQ, OutQ, InM, OutM, C, Tel>,
) -> Result<StepResult, NodeError>where
InQ: Edge,
OutQ: Edge,
InM: MemoryManager<InP>,
OutM: MemoryManager<()>,
C: PlatformClock + Sized,
Tel: Telemetry + Sized,
Default batched-step implementation that honors all NodePolicy batching
variants while delegating actual consumption to the implementor’s
single-message
process_message() method.Source§fn on_watchdog_timeout<C, Tel>(
&mut self,
clock: &C,
_t: &mut Tel,
) -> Result<StepResult, NodeError>
fn on_watchdog_timeout<C, Tel>( &mut self, clock: &C, _t: &mut Tel, ) -> Result<StepResult, NodeError>
Handle watchdog timeouts by applying over-budget policy (degrade/default/skip).
Auto Trait Implementations§
impl<S, InP, const IN: usize> Freeze for SinkNode<S, InP, IN>where
S: Freeze,
impl<S, InP, const IN: usize> RefUnwindSafe for SinkNode<S, InP, IN>where
S: RefUnwindSafe,
InP: RefUnwindSafe,
impl<S, InP, const IN: usize> Send for SinkNode<S, InP, IN>
impl<S, InP, const IN: usize> Sync for SinkNode<S, InP, IN>
impl<S, InP, const IN: usize> Unpin for SinkNode<S, InP, IN>
impl<S, InP, const IN: usize> UnsafeUnpin for SinkNode<S, InP, IN>where
S: UnsafeUnpin,
impl<S, InP, const IN: usize> UnwindSafe for SinkNode<S, InP, IN>where
S: UnwindSafe,
InP: UnwindSafe,
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