Struct breez_sdk_core::bitcoin::network::constants::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 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 as_u64(self) -> u64
👎Deprecated since 0.29.0: use to_u64 instead
pub fn as_u64(self) -> u64
Get the integer representation of this ServiceFlags.
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 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
§impl PartialOrd for ServiceFlags
impl PartialOrd for ServiceFlags
§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§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request