pub struct DirectCommunicators<I: Invocation> { /* private fields */ }Implementations§
Source§impl<I: Invocation> DirectCommunicators<I>
impl<I: Invocation> DirectCommunicators<I>
pub fn new() -> Self
pub fn with_characteristics(packet_loss: f32, e2e_delay: Normal<f32>) -> Self
pub async fn set_packet_loss( &mut self, from: NodeIdOf<I>, to: NodeIdOf<I>, packet_loss: f32, )
pub async fn set_delay( &mut self, from: NodeIdOf<I>, to: NodeIdOf<I>, delay: Normal<f32>, )
pub async fn register(&self, node_id: NodeIdOf<I>, handler: RequestHandler<I>)
pub fn events(&self) -> impl Stream<Item = DirectCommunicatorEvent<I>>
pub fn create_communicator_for( &self, node_id: NodeIdOf<I>, ) -> DirectCommunicator<I>
Trait Implementations§
Source§impl<I: Invocation> Clone for DirectCommunicators<I>
impl<I: Invocation> Clone for DirectCommunicators<I>
Source§impl<I: Debug + Invocation> Debug for DirectCommunicators<I>
impl<I: Debug + Invocation> Debug for DirectCommunicators<I>
Source§impl<I: Invocation> Default for DirectCommunicators<I>
impl<I: Invocation> Default for DirectCommunicators<I>
Auto Trait Implementations§
impl<I> Freeze for DirectCommunicators<I>
impl<I> !RefUnwindSafe for DirectCommunicators<I>
impl<I> Send for DirectCommunicators<I>
impl<I> Sync for DirectCommunicators<I>
impl<I> Unpin for DirectCommunicators<I>
impl<I> UnsafeUnpin for DirectCommunicators<I>
impl<I> !UnwindSafe for DirectCommunicators<I>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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