[][src]Struct bitcoin::network::constants::ServiceFlags

pub struct 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]

impl From<u64> for ServiceFlags[src]

impl Ord for ServiceFlags[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<ServiceFlags> for ServiceFlags[src]

impl Into<u64> for ServiceFlags[src]

impl Clone for 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]

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.

impl BitXor<ServiceFlags> for ServiceFlags[src]

type Output = Self

The resulting type after applying the ^ operator.

impl BitOrAssign<ServiceFlags> for ServiceFlags[src]

impl BitXorAssign<ServiceFlags> for ServiceFlags[src]

impl Hash for ServiceFlags[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToHex for T where
    T: LowerHex
[src]

fn to_hex(&self) -> String[src]

Outputs the hash in hexadecimal form