pub struct RoundBasedNetworkAdapter<M, K: KeyType> { /* private fields */ }
Expand description
Wrapper to adapt NetworkServiceHandle
to round-based protocols
Implementations§
Source§impl<M, K: KeyType> RoundBasedNetworkAdapter<M, K>
impl<M, K: KeyType> RoundBasedNetworkAdapter<M, K>
pub fn new( handle: NetworkServiceHandle<K>, _party_index: PartyIndex, _parties: &HashMap<PartyIndex, PeerId>, protocol_id: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl<M, K: KeyType> Delivery<M> for RoundBasedNetworkAdapter<M, K>
impl<M, K: KeyType> Delivery<M> for RoundBasedNetworkAdapter<M, K>
Source§type Send = RoundBasedSender<M, K>
type Send = RoundBasedSender<M, K>
Outgoing delivery channel
Source§type Receive = RoundBasedReceiver<M, K>
type Receive = RoundBasedReceiver<M, K>
Incoming delivery channel
Source§type SendError = NetworkError
type SendError = NetworkError
Error of outgoing delivery channel
Source§type ReceiveError = NetworkError
type ReceiveError = NetworkError
Error of incoming delivery channel
Auto Trait Implementations§
impl<M, K> Freeze for RoundBasedNetworkAdapter<M, K>
impl<M, K> !RefUnwindSafe for RoundBasedNetworkAdapter<M, K>
impl<M, K> Send for RoundBasedNetworkAdapter<M, K>where
M: Send,
impl<M, K> Sync for RoundBasedNetworkAdapter<M, K>where
M: Sync,
impl<M, K> Unpin for RoundBasedNetworkAdapter<M, K>
impl<M, K> !UnwindSafe for RoundBasedNetworkAdapter<M, K>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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