pub struct Output<T> { /* private fields */ }Expand description
A typed publishing handle for one of the node’s outputs.
Implementations§
Source§impl<T> Output<T>
impl<T> Output<T>
Sourcepub fn send_arrow<A>(
&mut self,
value: &A,
metadata: Metadata,
) -> ArrowSendResult<()>
Available on crate feature arrow-interop only.
pub fn send_arrow<A>( &mut self, value: &A, metadata: Metadata, ) -> ArrowSendResult<()>
arrow-interop only.Publishes an arrow-rs value, bypassing the type.
As RawOutput::send_arrow; the typed skin offers it for the same
reason it offers Output::send_batch — a typed handle should not be
a reason to go and fetch the raw one.
§Errors
Source§impl<T> Output<T>
impl<T> Output<T>
Sourcepub fn plane(&self) -> RoutePlane
pub fn plane(&self) -> RoutePlane
The plane this output publishes on right now (§6.3).
Sourcepub fn metadata(&self) -> Metadata
pub fn metadata(&self) -> Metadata
A fresh metadata block stamped with this node’s clock (§4.3).
Sourcepub const fn raw(&self) -> &RawOutput
pub const fn raw(&self) -> &RawOutput
The untyped handle underneath, for a send this type cannot express.
Sourcepub fn send_batch(
&mut self,
batch: &RecordBatch,
metadata: Metadata,
) -> Result<()>
pub fn send_batch( &mut self, batch: &RecordBatch, metadata: Metadata, ) -> Result<()>
Sourcepub fn allocate(&mut self, len: usize) -> Result<OutputSample<'_>>
pub fn allocate(&mut self, len: usize) -> Result<OutputSample<'_>>
Source§impl<T: AstrsMessage> Output<T>
impl<T: AstrsMessage> Output<T>
Sourcepub fn send(&mut self, value: impl Into<T>, metadata: Metadata) -> Result<()>
pub fn send(&mut self, value: impl Into<T>, metadata: Metadata) -> Result<()>
Publishes one value.
§Errors
crate::NodeError::Data when the value cannot be encoded, plus
whatever RawOutput::send_batch reports.
Sourcepub fn publish(&mut self, value: impl Into<T>) -> Result<()>
pub fn publish(&mut self, value: impl Into<T>) -> Result<()>
Publishes one value with a freshly stamped metadata block.
The shortest form, for a node with nothing to correlate.
§Errors
As Output::send.
Sourcepub fn send_following(
&mut self,
value: impl Into<T>,
cause: &Metadata,
) -> Result<()>
pub fn send_following( &mut self, value: impl Into<T>, cause: &Metadata, ) -> Result<()>
Publishes one value, following cause’s correlation and timing
metadata (§9.4).
This is the blueprint §9.1 shape: detections.send(run_model(&img)?, meta.follow())? — the response of a service, the next chunk of a
stream, and the derived output of a pipeline stage all keep the keys
that make them traceable.
§Errors
As Output::send.