pub struct OutChannels(/* private fields */);Expand description
§Output Channels
A hash-table mapping NodeId to OutChannel. In Dagrs, each Node stores output
channels in this map, enabling Node to send information packets to other Nodes.
Implementations§
Source§impl OutChannels
impl OutChannels
Sourcepub fn blocking_send_to(
&self,
id: &NodeId,
content: Content,
) -> Result<(), SendErr>
pub fn blocking_send_to( &self, id: &NodeId, content: Content, ) -> Result<(), SendErr>
Perform a blocking send on the outcoming channel from NodeId.
Sourcepub async fn send_to(
&self,
id: &NodeId,
content: Content,
) -> Result<(), SendErr>
pub async fn send_to( &self, id: &NodeId, content: Content, ) -> Result<(), SendErr>
Perform a asynchronous send on the outcoming channel from NodeId.
Sourcepub async fn broadcast(&self, content: Content) -> Vec<Result<(), SendErr>>
pub async fn broadcast(&self, content: Content) -> Vec<Result<(), SendErr>>
Broadcasts the content to all the OutChannels asynchronously.
Sourcepub fn blocking_broadcast(&self, content: Content) -> Vec<Result<(), SendErr>>
pub fn blocking_broadcast(&self, content: Content) -> Vec<Result<(), SendErr>>
Blocking broadcasts the content to all the OutChannels.
Trait Implementations§
Source§impl Default for OutChannels
impl Default for OutChannels
Source§fn default() -> OutChannels
fn default() -> OutChannels
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for OutChannels
impl !UnwindSafe for OutChannels
impl Freeze for OutChannels
impl Send for OutChannels
impl Sync for OutChannels
impl Unpin for OutChannels
impl UnsafeUnpin for OutChannels
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more