Enum gossip_kv::util::ClientRequestWithAddress
source · pub enum ClientRequestWithAddress<A> {
Get {
key: Key,
addr: A,
},
Set {
key: Key,
value: String,
addr: A,
},
Delete {
key: Key,
addr: A,
},
}
Expand description
Convenience enum to represent a client request with the address of the client. Makes it
possible to use demux_enum
in the surface syntax.
Variants§
Get
A get request with the key and the address of the client.
Set
A set request with the key, value and the address of the client.
Delete
A delete request with the key and the address of the client.
Implementations§
source§impl<A> ClientRequestWithAddress<A>
impl<A> ClientRequestWithAddress<A>
sourcepub fn from_request_and_address(request: ClientRequest, addr: A) -> Self
pub fn from_request_and_address(request: ClientRequest, addr: A) -> Self
Create a ClientRequestWithAddress
from a ClientRequest
and an address.
Trait Implementations§
source§impl<A: Debug> Debug for ClientRequestWithAddress<A>
impl<A: Debug> Debug for ClientRequestWithAddress<A>
source§impl<A, __PusheratorDelete, __PusheratorGet, __PusheratorSet> DemuxEnum<(__PusheratorDelete, __PusheratorGet, __PusheratorSet)> for ClientRequestWithAddress<A>
impl<A, __PusheratorDelete, __PusheratorGet, __PusheratorSet> DemuxEnum<(__PusheratorDelete, __PusheratorGet, __PusheratorSet)> for ClientRequestWithAddress<A>
source§fn demux_enum(
self,
(__pusherator_delete, __pusherator_get, __pusherator_set): &mut (__PusheratorDelete, __PusheratorGet, __PusheratorSet),
)
fn demux_enum( self, (__pusherator_delete, __pusherator_get, __pusherator_set): &mut (__PusheratorDelete, __PusheratorGet, __PusheratorSet), )
Pushes self into the corresponding output pusherator in
outputs
.impl<A> DemuxEnumBase for ClientRequestWithAddress<A>
Auto Trait Implementations§
impl<A> Freeze for ClientRequestWithAddress<A>where
A: Freeze,
impl<A> RefUnwindSafe for ClientRequestWithAddress<A>where
A: RefUnwindSafe,
impl<A> Send for ClientRequestWithAddress<A>where
A: Send,
impl<A> Sync for ClientRequestWithAddress<A>where
A: Sync,
impl<A> Unpin for ClientRequestWithAddress<A>where
A: Unpin,
impl<A> UnwindSafe for ClientRequestWithAddress<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