Enum gossip_kv::util::GossipRequestWithAddress
source · pub enum GossipRequestWithAddress<A> {
Gossip {
message_id: String,
member_id: String,
writes: Namespaces<Clock>,
addr: A,
},
Ack {
message_id: String,
member_id: String,
addr: A,
},
Nack {
message_id: String,
member_id: String,
addr: A,
},
}
Expand description
Convenience enum to represent a gossip request with the address of the client. Makes it
possible to use demux_enum
in the surface syntax.
Variants§
Gossip
A gossip request with the message id, writes and the address of the client.
Ack
An ack request with the message id and the address of the client.
Nack
A nack request with the message id and the address of the client.
Implementations§
source§impl<A> GossipRequestWithAddress<A>
impl<A> GossipRequestWithAddress<A>
sourcepub fn from_request_and_address(request: GossipMessage, addr: A) -> Self
pub fn from_request_and_address(request: GossipMessage, addr: A) -> Self
Create a GossipRequestWithAddress
from a GossipMessage
and an address.
Trait Implementations§
source§impl<A: Debug> Debug for GossipRequestWithAddress<A>
impl<A: Debug> Debug for GossipRequestWithAddress<A>
source§impl<A, __PusheratorAck, __PusheratorGossip, __PusheratorNack> DemuxEnum<(__PusheratorAck, __PusheratorGossip, __PusheratorNack)> for GossipRequestWithAddress<A>
impl<A, __PusheratorAck, __PusheratorGossip, __PusheratorNack> DemuxEnum<(__PusheratorAck, __PusheratorGossip, __PusheratorNack)> for GossipRequestWithAddress<A>
source§fn demux_enum(
self,
(__pusherator_ack, __pusherator_gossip, __pusherator_nack): &mut (__PusheratorAck, __PusheratorGossip, __PusheratorNack),
)
fn demux_enum( self, (__pusherator_ack, __pusherator_gossip, __pusherator_nack): &mut (__PusheratorAck, __PusheratorGossip, __PusheratorNack), )
Pushes self into the corresponding output pusherator in
outputs
.impl<A> DemuxEnumBase for GossipRequestWithAddress<A>
Auto Trait Implementations§
impl<A> Freeze for GossipRequestWithAddress<A>where
A: Freeze,
impl<A> RefUnwindSafe for GossipRequestWithAddress<A>where
A: RefUnwindSafe,
impl<A> Send for GossipRequestWithAddress<A>where
A: Send,
impl<A> Sync for GossipRequestWithAddress<A>where
A: Sync,
impl<A> Unpin for GossipRequestWithAddress<A>where
A: Unpin,
impl<A> UnwindSafe for GossipRequestWithAddress<A>where
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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