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 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.
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 for ServiceFlags
impl BitOr for ServiceFlags
Source§type Output = ServiceFlags
type Output = ServiceFlags
| operator.Source§fn bitor(self, rhs: ServiceFlags) -> ServiceFlags
fn bitor(self, rhs: ServiceFlags) -> ServiceFlags
| operation. Read moreSource§impl BitOrAssign for ServiceFlags
impl BitOrAssign for ServiceFlags
Source§fn bitor_assign(&mut self, rhs: ServiceFlags)
fn bitor_assign(&mut self, rhs: ServiceFlags)
|= operation. Read moreSource§impl BitXor for ServiceFlags
impl BitXor for ServiceFlags
Source§type Output = ServiceFlags
type Output = ServiceFlags
^ operator.Source§fn bitxor(self, rhs: ServiceFlags) -> ServiceFlags
fn bitxor(self, rhs: ServiceFlags) -> ServiceFlags
^ operation. Read moreSource§impl BitXorAssign for ServiceFlags
impl BitXorAssign for ServiceFlags
Source§fn bitxor_assign(&mut self, rhs: ServiceFlags)
fn bitxor_assign(&mut self, rhs: ServiceFlags)
^= 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§fn consensus_decode<R>(r: &mut R) -> Result<ServiceFlags, Error>
fn consensus_decode<R>(r: &mut R) -> Result<ServiceFlags, Error>
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) -> u64
fn from(flags: ServiceFlags) -> u64
Source§impl From<u64> for ServiceFlags
impl From<u64> for ServiceFlags
Source§fn from(f: u64) -> ServiceFlags
fn from(f: u64) -> 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 for ServiceFlags
impl PartialEq for ServiceFlags
Source§impl PartialOrd for ServiceFlags
impl PartialOrd for ServiceFlags
Source§impl UpperHex for ServiceFlags
impl UpperHex for ServiceFlags
impl Copy for ServiceFlags
impl Eq for ServiceFlags
impl StructuralPartialEq for ServiceFlags
Auto Trait Implementations§
impl Freeze for ServiceFlags
impl RefUnwindSafe for ServiceFlags
impl Send for ServiceFlags
impl Sync for ServiceFlags
impl Unpin for ServiceFlags
impl UnwindSafe for ServiceFlags
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.