pub struct ProtocolFlags(u32);Expand description
Bit flags describing how a protocol takes part in handshake and
discovery. Combine with |. empty() means the protocol is
negotiated but neither required nor advertised.
Tuple Fields§
§0: u32Implementations§
Source§impl ProtocolFlags
impl ProtocolFlags
Sourcepub const REQUIRED: Self
pub const REQUIRED: Self
Peers must speak this protocol. Handshake fails if absent and discovery filters out peers that do not advertise it.
Sourcepub const PREFERRED: Self
pub const PREFERRED: Self
Advertised so discovery prefers peers that also have it, but peers without it are still accepted. The default.
Trait Implementations§
Source§impl BitOr for ProtocolFlags
impl BitOr for ProtocolFlags
Source§impl BitOrAssign for ProtocolFlags
impl BitOrAssign for ProtocolFlags
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl Clone for ProtocolFlags
impl Clone for ProtocolFlags
Source§fn clone(&self) -> ProtocolFlags
fn clone(&self) -> ProtocolFlags
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ProtocolFlags
Source§impl Debug for ProtocolFlags
impl Debug for ProtocolFlags
impl Eq for ProtocolFlags
Source§impl From<u32> for ProtocolFlags
impl From<u32> for ProtocolFlags
Source§impl PartialEq for ProtocolFlags
impl PartialEq for ProtocolFlags
Source§fn eq(&self, other: &ProtocolFlags) -> bool
fn eq(&self, other: &ProtocolFlags) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProtocolFlags
Auto Trait Implementations§
impl Freeze for ProtocolFlags
impl RefUnwindSafe for ProtocolFlags
impl Send for ProtocolFlags
impl Sync for ProtocolFlags
impl Unpin for ProtocolFlags
impl UnsafeUnpin for ProtocolFlags
impl UnwindSafe for ProtocolFlags
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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