Enum bitcoin::NetworkKind
source · pub enum NetworkKind {
Main,
Test,
}
Expand description
What kind of network we are on.
Variants§
Implementations§
source§impl NetworkKind
impl NetworkKind
sourcepub fn is_mainnet(&self) -> bool
pub fn is_mainnet(&self) -> bool
Returns true if this is real mainnet bitcoin.
Trait Implementations§
source§impl Clone for NetworkKind
impl Clone for NetworkKind
source§fn clone(&self) -> NetworkKind
fn clone(&self) -> NetworkKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NetworkKind
impl Debug for NetworkKind
source§impl From<Network> for NetworkKind
impl From<Network> for NetworkKind
source§impl Hash for NetworkKind
impl Hash for NetworkKind
source§impl Ord for NetworkKind
impl Ord for NetworkKind
source§fn cmp(&self, other: &NetworkKind) -> Ordering
fn cmp(&self, other: &NetworkKind) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<NetworkKind> for NetworkKind
impl PartialEq<NetworkKind> for NetworkKind
source§fn eq(&self, other: &NetworkKind) -> bool
fn eq(&self, other: &NetworkKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<NetworkKind> for NetworkKind
impl PartialOrd<NetworkKind> for NetworkKind
source§fn partial_cmp(&self, other: &NetworkKind) -> Option<Ordering>
fn partial_cmp(&self, other: &NetworkKind) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for NetworkKind
impl Eq for NetworkKind
impl StructuralEq for NetworkKind
impl StructuralPartialEq for NetworkKind
Auto Trait Implementations§
impl RefUnwindSafe for NetworkKind
impl Send for NetworkKind
impl Sync for NetworkKind
impl Unpin for NetworkKind
impl UnwindSafe for NetworkKind
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
Mutably borrows from an owned value. Read more