pub enum SessionType {
Outbound,
Inbound,
BlockRelayOnly,
}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
BlockRelayOnly
We use block-relay-only connections to help prevent against partition attacks. By not relaying transactions or addresses, these connections are harder to detect by a third party, thus helping obfuscate the network topology.
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
Sourcepub fn is_block_relay_only(&self) -> bool
pub fn is_block_relay_only(&self) -> bool
is block_relay_only
Trait Implementations§
Source§impl Clone for SessionType
impl Clone for SessionType
Source§fn clone(&self) -> SessionType
fn clone(&self) -> SessionType
Returns a duplicate 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
RawSessionType only covers Inbound and Outbound,
and that BlockRelayOnly is explicitly set during peer registration.
impl From<SessionType> for SessionType
RawSessionType only covers Inbound and Outbound, and that BlockRelayOnly is explicitly set during peer registration.
Source§fn from(ty: RawSessionType) -> Self
fn from(ty: RawSessionType) -> Self
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
impl Copy for SessionType
impl Eq for SessionType
impl StructuralPartialEq for SessionType
Auto Trait Implementations§
impl Freeze for SessionType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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