pub struct NDArrayOutput { /* private fields */ }Expand description
Fan-out: publishes arrays to multiple downstream receivers.
Implementations§
Source§impl NDArrayOutput
impl NDArrayOutput
pub fn new() -> Self
pub fn add(&mut self, sender: NDArraySender)
pub fn remove(&mut self, port_name: &str)
Sourcepub fn take(&mut self, port_name: &str) -> Option<NDArraySender>
pub fn take(&mut self, port_name: &str) -> Option<NDArraySender>
Remove a sender by port name and return it (if found).
Sourcepub async fn publish(&self, array: Arc<NDArray>) -> Vec<PublishOutcome>
pub async fn publish(&self, array: Arc<NDArray>) -> Vec<PublishOutcome>
Publish an array to all downstream receivers (async, concurrent).
Each sender publishes independently. Returns the per-sender outcomes
so the caller can count DroppedArrays for any downstream whose queue
was full (C++ driverCallback semantics).
Sourcepub async fn publish_to(
&self,
index: usize,
array: Arc<NDArray>,
) -> Option<PublishOutcome>
pub async fn publish_to( &self, index: usize, array: Arc<NDArray>, ) -> Option<PublishOutcome>
Publish an array to a single downstream receiver by index (for scatter/round-robin).
pub fn num_senders(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NDArrayOutput
impl !RefUnwindSafe for NDArrayOutput
impl Send for NDArrayOutput
impl Sync for NDArrayOutput
impl Unpin for NDArrayOutput
impl UnsafeUnpin for NDArrayOutput
impl !UnwindSafe for NDArrayOutput
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