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 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 as_u64(self) -> u64
pub fn as_u64(self) -> u64
Get the integer representation of this ServiceFlags.
Trait Implementations§
Source§impl BitOr for ServiceFlags
impl BitOr for ServiceFlags
Source§impl BitOrAssign for ServiceFlags
impl BitOrAssign for ServiceFlags
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moreSource§impl BitXor for ServiceFlags
impl BitXor for ServiceFlags
Source§impl BitXorAssign for ServiceFlags
impl BitXorAssign 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 more