Struct bdk_chain::bitcoin::p2p::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§impl Debug for ServiceFlags
impl Debug for ServiceFlags
§impl Decodable for ServiceFlags
impl Decodable for ServiceFlags
§impl Default for ServiceFlags
impl Default for ServiceFlags
§fn default() -> ServiceFlags
fn default() -> ServiceFlags
§impl Display for ServiceFlags
impl Display for ServiceFlags
§impl Encodable for ServiceFlags
impl Encodable for ServiceFlags
§impl From<ServiceFlags> for u64
impl From<ServiceFlags> for u64
§fn from(flags: ServiceFlags) -> u64
fn from(flags: ServiceFlags) -> u64
§impl From<u64> for ServiceFlags
impl From<u64> for ServiceFlags
§fn from(f: u64) -> ServiceFlags
fn from(f: u64) -> ServiceFlags
§impl Hash for ServiceFlags
impl Hash for ServiceFlags
§impl LowerHex for ServiceFlags
impl LowerHex for ServiceFlags
§impl Ord for ServiceFlags
impl Ord for ServiceFlags
§impl PartialEq for ServiceFlags
impl PartialEq for ServiceFlags
§fn eq(&self, other: &ServiceFlags) -> bool
fn eq(&self, other: &ServiceFlags) -> bool
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for ServiceFlags
impl PartialOrd for ServiceFlags
§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