pub struct VoidDelegate<I, A>(/* private fields */);Expand description
Void delegate
Implementations§
Source§impl<I, A> VoidDelegate<I, A>
impl<I, A> VoidDelegate<I, A>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new VoidDelegate.
Trait Implementations§
Source§impl<I, A> AliveDelegate for VoidDelegate<I, A>
impl<I, A> AliveDelegate for VoidDelegate<I, A>
Source§type Error = VoidDelegateError
type Error = VoidDelegateError
The error type of the delegate
Source§impl<I: Clone, A: Clone> Clone for VoidDelegate<I, A>
impl<I: Clone, A: Clone> Clone for VoidDelegate<I, A>
Source§fn clone(&self) -> VoidDelegate<I, A>
fn clone(&self) -> VoidDelegate<I, A>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<I, A> ConflictDelegate for VoidDelegate<I, A>
impl<I, A> ConflictDelegate for VoidDelegate<I, A>
impl<I: Copy, A: Copy> Copy for VoidDelegate<I, A>
Source§impl<I, A> Default for VoidDelegate<I, A>
impl<I, A> Default for VoidDelegate<I, A>
Source§impl<I, A> Delegate for VoidDelegate<I, A>
impl<I, A> Delegate for VoidDelegate<I, A>
Source§impl<I, A> EventDelegate for VoidDelegate<I, A>
impl<I, A> EventDelegate for VoidDelegate<I, A>
Source§impl<I, A> MergeDelegate for VoidDelegate<I, A>
impl<I, A> MergeDelegate for VoidDelegate<I, A>
Source§type Error = VoidDelegateError
type Error = VoidDelegateError
The error type of the delegate
Source§impl<I, A> NodeDelegate for VoidDelegate<I, A>
impl<I, A> NodeDelegate for VoidDelegate<I, A>
Source§async fn node_meta(&self, _limit: usize) -> Meta
async fn node_meta(&self, _limit: usize) -> Meta
Used to retrieve meta-data about the current node
when broadcasting an alive message. It’s length is limited to
the given byte size. This metadata is available in the NodeState structure.
Source§async fn notify_message(&self, _msg: Cow<'_, [u8]>)
async fn notify_message(&self, _msg: Cow<'_, [u8]>)
Called when a user-data message is received.
Care should be taken that this method does not block, since doing
so would block the entire UDP packet receive loop. Additionally, the byte
slice may be modified after the call returns, so it should be copied if needed
Source§async fn broadcast_messages<F>(
&self,
_limit: usize,
_encoded_len: F,
) -> impl Iterator<Item = Bytes> + Send
async fn broadcast_messages<F>( &self, _limit: usize, _encoded_len: F, ) -> impl Iterator<Item = Bytes> + Send
Called when user data messages can be broadcast.
It can return a list of buffers to send. Each buffer should assume an
overhead as provided with a limit on the total byte size allowed.
The total byte size of the resulting data to send must not exceed
the limit. Care should be taken that this method does not block,
since doing so would block the entire UDP packet receive loop. Read more
Source§async fn local_state(&self, _join: bool) -> Bytes
async fn local_state(&self, _join: bool) -> Bytes
Used for a TCP Push/Pull. This is sent to
the remote side in addition to the membership information. Any
data can be sent here. See
merge_remote_state as well. The join
boolean indicates this is for a join instead of a push/pull.Source§async fn merge_remote_state(&self, _buf: &[u8], _join: bool)
async fn merge_remote_state(&self, _buf: &[u8], _join: bool)
Invoked after a TCP Push/Pull. This is the
state received from the remote side and is the result of the
remote side’s
local_state call. The ‘join’
boolean indicates this is for a join instead of a push/pull.Source§impl<I, A> PingDelegate for VoidDelegate<I, A>
impl<I, A> PingDelegate for VoidDelegate<I, A>
Source§async fn ack_payload(&self) -> Bytes
async fn ack_payload(&self) -> Bytes
Invoked when an ack is being sent; the returned bytes will be appended to the ack
Source§async fn notify_ping_complete(
&self,
_node: Arc<NodeState<Self::Id, Self::Address>>,
_rtt: Duration,
_payload: Bytes,
)
async fn notify_ping_complete( &self, _node: Arc<NodeState<Self::Id, Self::Address>>, _rtt: Duration, _payload: Bytes, )
Invoked when an ack for a ping is received
Source§fn disable_reliable_pings(&self, _target: &Self::Id) -> bool
fn disable_reliable_pings(&self, _target: &Self::Id) -> bool
Invoked when we want to send a ping message to target by promised connection.
Return true if the target node does not expect ping message from promised connection.
Auto Trait Implementations§
impl<I, A> Freeze for VoidDelegate<I, A>
impl<I, A> RefUnwindSafe for VoidDelegate<I, A>where
I: RefUnwindSafe,
A: RefUnwindSafe,
impl<I, A> Send for VoidDelegate<I, A>
impl<I, A> Sync for VoidDelegate<I, A>
impl<I, A> Unpin for VoidDelegate<I, A>
impl<I, A> UnsafeUnpin for VoidDelegate<I, A>
impl<I, A> UnwindSafe for VoidDelegate<I, A>where
I: UnwindSafe,
A: UnwindSafe,
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