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

pub struct ServiceFlags(_);

Flags to indicate which network services a node supports.

Implementations

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 BitOr<ServiceFlags> for ServiceFlags[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<ServiceFlags> for ServiceFlags[src]

impl BitXor<ServiceFlags> for ServiceFlags[src]

type Output = Self

The resulting type after applying the ^ operator.

impl BitXorAssign<ServiceFlags> for ServiceFlags[src]

impl Clone for ServiceFlags[src]

impl Copy for ServiceFlags[src]

impl Debug for ServiceFlags[src]

impl Decodable for ServiceFlags[src]

impl Display for ServiceFlags[src]

impl Encodable for ServiceFlags[src]

impl Eq for ServiceFlags[src]

impl From<u64> for ServiceFlags[src]

impl Hash for ServiceFlags[src]

impl Into<u64> for ServiceFlags[src]

impl LowerHex for ServiceFlags[src]

impl Ord for ServiceFlags[src]

impl PartialEq<ServiceFlags> for ServiceFlags[src]

impl PartialOrd<ServiceFlags> for ServiceFlags[src]

impl StructuralEq for ServiceFlags[src]

impl StructuralPartialEq for ServiceFlags[src]

impl UpperHex for ServiceFlags[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

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

Outputs the hash in hexadecimal form

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.