pub enum ConnRole {
Proxy,
Client,
Server,
DnodePeerProxy,
DnodePeerClient,
DnodePeerServer,
}Expand description
Role tag for a connection. Mirrors the role enumeration on
struct conn in the C engine.
Variants§
Proxy
Client-facing listener that accepted the connection.
Client
Connection from a client driver (Redis or Memcached).
Server
Connection to a backend datastore (Redis or Memcached).
DnodePeerProxy
Listener that accepts dnode peer connections from other nodes.
DnodePeerClient
Inbound dnode peer connection (a remote node connected to us).
DnodePeerServer
Outbound dnode peer connection (we connected to a remote node).
Implementations§
Source§impl ConnRole
impl ConnRole
Sourcepub fn is_listener(self) -> bool
pub fn is_listener(self) -> bool
True when the role represents a listening socket. Mirrors the
is_listener predicate used by the C reactor’s dispatch
branches.
§Examples
use dynomite::io::reactor::ConnRole;
assert!(ConnRole::Proxy.is_listener());
assert!(!ConnRole::Client.is_listener());Sourcepub fn is_dnode_peer(self) -> bool
pub fn is_dnode_peer(self) -> bool
True when the role represents a peer-to-peer dnode link.
§Examples
use dynomite::io::reactor::ConnRole;
assert!(ConnRole::DnodePeerClient.is_dnode_peer());
assert!(!ConnRole::Client.is_dnode_peer());Trait Implementations§
impl Copy for ConnRole
impl Eq for ConnRole
impl StructuralPartialEq for ConnRole
Auto Trait Implementations§
impl Freeze for ConnRole
impl RefUnwindSafe for ConnRole
impl Send for ConnRole
impl Sync for ConnRole
impl Unpin for ConnRole
impl UnsafeUnpin for ConnRole
impl UnwindSafe for ConnRole
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.