Enum ckb_network::SessionType
source · pub enum SessionType {
Outbound,
Inbound,
}Expand description
Indicates the session type
Variants§
Outbound
Representing yourself as the active party means that you are the client side
Inbound
Representing yourself as a passive recipient means that you are the server side
Implementations§
source§impl SessionType
impl SessionType
sourcepub fn is_outbound(self) -> bool
pub fn is_outbound(self) -> bool
is outbound
sourcepub fn is_inbound(self) -> bool
pub fn is_inbound(self) -> bool
is inbound
Trait Implementations§
source§impl Clone for SessionType
impl Clone for SessionType
source§fn clone(&self) -> SessionType
fn clone(&self) -> SessionType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SessionType
impl Debug for SessionType
source§impl From<SessionType> for SessionType
impl From<SessionType> for SessionType
source§fn from(ty: SessionType) -> SessionType
fn from(ty: SessionType) -> SessionType
Converts to this type from the input type.
source§impl Hash for SessionType
impl Hash for SessionType
source§impl PartialEq for SessionType
impl PartialEq for SessionType
source§fn eq(&self, other: &SessionType) -> bool
fn eq(&self, other: &SessionType) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Copy for SessionType
impl Eq for SessionType
impl StructuralEq for SessionType
impl StructuralPartialEq for SessionType
Auto Trait Implementations§
impl RefUnwindSafe for SessionType
impl Send for SessionType
impl Sync for SessionType
impl Unpin for SessionType
impl UnwindSafe for SessionType
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