Struct ServiceFlags
pub struct ServiceFlags(/* private fields */);
Expand description
Flags to indicate which network services a node supports.
Implementations§
§impl ServiceFlags
impl ServiceFlags
pub const NONE: ServiceFlags = _
pub const NONE: ServiceFlags = _
NONE means no services supported.
pub 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.
pub 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.
pub 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)
pub const WITNESS: ServiceFlags = _
pub const WITNESS: ServiceFlags = _
WITNESS indicates that a node can be asked for blocks and transactions including witness data.
pub 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.
pub 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.
pub const P2P_V2: ServiceFlags = _
pub const P2P_V2: ServiceFlags = _
P2P_V2 indicates that the node supports the P2P v2 encrypted transport protocol. See BIP324 for details on how this is implemented.
pub fn add(&mut self, other: ServiceFlags) -> ServiceFlags
pub fn add(&mut self, other: ServiceFlags) -> ServiceFlags
Add ServiceFlags together.
Returns itself.
pub fn remove(&mut self, other: ServiceFlags) -> ServiceFlags
pub fn remove(&mut self, other: ServiceFlags) -> ServiceFlags
Remove ServiceFlags from this.
Returns itself.
pub fn has(self, flags: ServiceFlags) -> bool
pub fn has(self, flags: ServiceFlags) -> bool
Check whether ServiceFlags are included in this one.
pub fn to_u64(self) -> u64
pub fn to_u64(self) -> u64
Gets the integer representation of this ServiceFlags
.
Trait Implementations§
§impl BitOr for ServiceFlags
impl BitOr for ServiceFlags
§type Output = ServiceFlags
type Output = ServiceFlags
|
operator.§fn bitor(self, rhs: ServiceFlags) -> ServiceFlags
fn bitor(self, rhs: ServiceFlags) -> ServiceFlags
|
operation. Read more§impl BitOrAssign for ServiceFlags
impl BitOrAssign for ServiceFlags
§fn bitor_assign(&mut self, rhs: ServiceFlags)
fn bitor_assign(&mut self, rhs: ServiceFlags)
|=
operation. Read more§impl BitXor for ServiceFlags
impl BitXor for ServiceFlags
§type Output = ServiceFlags
type Output = ServiceFlags
^
operator.§fn bitxor(self, rhs: ServiceFlags) -> ServiceFlags
fn bitxor(self, rhs: ServiceFlags) -> ServiceFlags
^
operation. Read more§impl BitXorAssign for ServiceFlags
impl BitXorAssign for ServiceFlags
§fn bitxor_assign(&mut self, rhs: ServiceFlags)
fn bitxor_assign(&mut self, rhs: ServiceFlags)
^=
operation. Read more§impl Clone for ServiceFlags
impl Clone for ServiceFlags
§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