[−][src]Struct bitcoin::network::constants::ServiceFlags
Flags to indicate which network services a node supports.
Methods
impl ServiceFlags
[src]
pub const NONE: ServiceFlags
[src]
NONE means no services supported.
pub const NETWORK: ServiceFlags
[src]
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
[src]
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
[src]
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
[src]
WITNESS indicates that a node can be asked for blocks and transactions including witness data.
pub const COMPACT_FILTERS: ServiceFlags
[src]
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
[src]
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 fn add(&mut self, other: ServiceFlags) -> ServiceFlags
[src]
Add [ServiceFlags] together.
Returns itself.
pub fn remove(&mut self, other: ServiceFlags) -> ServiceFlags
[src]
Remove [ServiceFlags] from this.
Returns itself.
pub fn has(self, flags: ServiceFlags) -> bool
[src]
Check whether [ServiceFlags] are included in this one.
pub fn as_u64(self) -> u64
[src]
Get the integer representation of this [ServiceFlags].
Trait Implementations
impl Encodable for ServiceFlags
[src]
impl Decodable for ServiceFlags
[src]
fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>
[src]
impl From<u64> for ServiceFlags
[src]
impl Ord for ServiceFlags
[src]
fn cmp(&self, other: &ServiceFlags) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<ServiceFlags> for ServiceFlags
[src]
fn partial_cmp(&self, other: &ServiceFlags) -> Option<Ordering>
[src]
fn lt(&self, other: &ServiceFlags) -> bool
[src]
fn le(&self, other: &ServiceFlags) -> bool
[src]
fn gt(&self, other: &ServiceFlags) -> bool
[src]
fn ge(&self, other: &ServiceFlags) -> bool
[src]
impl Into<u64> for ServiceFlags
[src]
impl Clone for ServiceFlags
[src]
fn clone(&self) -> ServiceFlags
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<ServiceFlags> for ServiceFlags
[src]
fn eq(&self, other: &ServiceFlags) -> bool
[src]
fn ne(&self, other: &ServiceFlags) -> bool
[src]
impl Eq for ServiceFlags
[src]
impl Copy for ServiceFlags
[src]
impl Display for ServiceFlags
[src]
impl Debug for ServiceFlags
[src]
impl BitOr<ServiceFlags> for ServiceFlags
[src]
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, rhs: Self) -> Self
[src]
impl BitXor<ServiceFlags> for ServiceFlags
[src]
type Output = Self
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: Self) -> Self
[src]
impl BitOrAssign<ServiceFlags> for ServiceFlags
[src]
fn bitor_assign(&mut self, rhs: Self)
[src]
impl BitXorAssign<ServiceFlags> for ServiceFlags
[src]
fn bitxor_assign(&mut self, rhs: Self)
[src]
impl Hash for ServiceFlags
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl LowerHex for ServiceFlags
[src]
impl UpperHex for ServiceFlags
[src]
Auto Trait Implementations
impl Unpin for ServiceFlags
impl Sync for ServiceFlags
impl Send for ServiceFlags
impl UnwindSafe for ServiceFlags
impl RefUnwindSafe for ServiceFlags
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToHex for T where
T: LowerHex,
[src]
T: LowerHex,