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>)
pub async fn publish(&self, array: Arc<NDArray>)
Publish an array to all downstream receivers (async, reliable, concurrent).
Each sender is awaited independently — a slow downstream does not
block enqueue to sibling downstreams. The function returns after
all senders have completed their publish (enqueue or completion,
depending on blocking_callbacks).
Sourcepub async fn publish_to(&self, index: usize, array: Arc<NDArray>)
pub async fn publish_to(&self, index: usize, array: Arc<NDArray>)
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