Struct bitcoin::p2p::ServiceFlags
source · pub struct ServiceFlags(/* private fields */);
Expand description
Flags to indicate which network services a node supports.
Implementations§
source§impl ServiceFlags
impl ServiceFlags
sourcepub const NONE: ServiceFlags = _
pub const NONE: ServiceFlags = _
NONE means no services supported.
sourcepub const NETWORK: ServiceFlags = _
pub const NETWORK: ServiceFlags = _
NETWORK means that the node is capable of serving the complete block chain. It is currently set by all Bitcoin Core non pruned nodes, and is unset by SPV clients or other light clients.
sourcepub const GETUTXO: ServiceFlags = _
pub const GETUTXO: ServiceFlags = _
GETUTXO means the node is capable of responding to the getutxo protocol request. Bitcoin Core does not support this but a patch set called Bitcoin XT does. See BIP 64 for details on how this is implemented.
sourcepub const BLOOM: ServiceFlags = _
pub const BLOOM: ServiceFlags = _
BLOOM means the node is capable and willing to handle bloom-filtered connections. Bitcoin Core nodes used to support this by default, without advertising this bit, but no longer do as of protocol version 70011 (= NO_BLOOM_VERSION)
sourcepub const WITNESS: ServiceFlags = _
pub const WITNESS: ServiceFlags = _
WITNESS indicates that a node can be asked for blocks and transactions including witness data.
sourcepub const COMPACT_FILTERS: ServiceFlags = _
pub const COMPACT_FILTERS: ServiceFlags = _
COMPACT_FILTERS means the node will service basic block filter requests. See BIP157 and BIP158 for details on how this is implemented.
sourcepub const NETWORK_LIMITED: ServiceFlags = _
pub const NETWORK_LIMITED: ServiceFlags = _
NETWORK_LIMITED means the same as NODE_NETWORK with the limitation of only serving the last 288 (2 day) blocks. See BIP159 for details on how this is implemented.
sourcepub const UTREEXO: ServiceFlags = _
pub const UTREEXO: ServiceFlags = _
UTREEXO means this node can send and receive utreexo proofs.
sourcepub fn add(&mut self, other: ServiceFlags) -> ServiceFlags
pub fn add(&mut self, other: ServiceFlags) -> ServiceFlags
Add ServiceFlags together.
Returns itself.
sourcepub fn remove(&mut self, other: ServiceFlags) -> ServiceFlags
pub fn remove(&mut self, other: ServiceFlags) -> ServiceFlags
Remove ServiceFlags from this.
Returns itself.
sourcepub fn has(self, flags: ServiceFlags) -> bool
pub fn has(self, flags: ServiceFlags) -> bool
Check whether ServiceFlags are included in this one.
sourcepub fn to_u64(self) -> u64
pub fn to_u64(self) -> u64
Gets the integer representation of this ServiceFlags
.
Trait Implementations§
source§impl BitOr<ServiceFlags> for ServiceFlags
impl BitOr<ServiceFlags> for ServiceFlags
source§impl BitOrAssign<ServiceFlags> for ServiceFlags
impl BitOrAssign<ServiceFlags> for ServiceFlags
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moresource§impl BitXor<ServiceFlags> for ServiceFlags
impl BitXor<ServiceFlags> for ServiceFlags
source§impl BitXorAssign<ServiceFlags> for ServiceFlags
impl BitXorAssign<ServiceFlags> for ServiceFlags
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^=
operation. Read moresource§impl Clone for ServiceFlags
impl Clone for ServiceFlags
source§fn clone(&self) -> ServiceFlags
fn clone(&self) -> ServiceFlags
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ServiceFlags
impl Debug for ServiceFlags
source§impl Decodable for ServiceFlags
impl Decodable for ServiceFlags
source§impl Default for ServiceFlags
impl Default for ServiceFlags
source§fn default() -> ServiceFlags
fn default() -> ServiceFlags
source§impl Display for ServiceFlags
impl Display for ServiceFlags
source§impl Encodable for ServiceFlags
impl Encodable for ServiceFlags
source§impl From<ServiceFlags> for u64
impl From<ServiceFlags> for u64
source§fn from(flags: ServiceFlags) -> Self
fn from(flags: ServiceFlags) -> Self
source§impl From<u64> for ServiceFlags
impl From<u64> for ServiceFlags
source§impl Hash for ServiceFlags
impl Hash for ServiceFlags
source§impl LowerHex for ServiceFlags
impl LowerHex for ServiceFlags
source§impl Ord for ServiceFlags
impl Ord for ServiceFlags
source§fn cmp(&self, other: &ServiceFlags) -> Ordering
fn cmp(&self, other: &ServiceFlags) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<ServiceFlags> for ServiceFlags
impl PartialEq<ServiceFlags> for ServiceFlags
source§fn eq(&self, other: &ServiceFlags) -> bool
fn eq(&self, other: &ServiceFlags) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ServiceFlags> for ServiceFlags
impl PartialOrd<ServiceFlags> for ServiceFlags
source§fn partial_cmp(&self, other: &ServiceFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &ServiceFlags) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more