pub enum BitcoinNetwork {
Mainnet,
Testnet3,
Testnet4,
Signet,
Regtest,
Unknown,
}Expand description
The Bitcoin network a mempool endpoint is understood to serve.
BitcoinNetwork::Unknown is deliberate: an unrecognised operator-supplied
explorer is not assumed to be mainnet (or anything else). Guessing here
would reintroduce exactly the silent-wrong-chain risk this type exists to
remove.
Variants§
Mainnet
Bitcoin mainnet.
Testnet3
The legacy testnet3 network (/testnet or /testnet3).
Testnet4
The testnet4 network (the crate default).
Signet
The signet test network.
Regtest
A local regtest node (loopback host with no network in the path).
Unknown
Not classifiable from the URL — treat as unverified.
Implementations§
Trait Implementations§
Source§impl Clone for BitcoinNetwork
impl Clone for BitcoinNetwork
Source§fn clone(&self) -> BitcoinNetwork
fn clone(&self) -> BitcoinNetwork
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BitcoinNetwork
Source§impl Debug for BitcoinNetwork
impl Debug for BitcoinNetwork
Source§impl Display for BitcoinNetwork
impl Display for BitcoinNetwork
impl Eq for BitcoinNetwork
Source§impl PartialEq for BitcoinNetwork
impl PartialEq for BitcoinNetwork
impl StructuralPartialEq for BitcoinNetwork
Auto Trait Implementations§
impl Freeze for BitcoinNetwork
impl RefUnwindSafe for BitcoinNetwork
impl Send for BitcoinNetwork
impl Sync for BitcoinNetwork
impl Unpin for BitcoinNetwork
impl UnsafeUnpin for BitcoinNetwork
impl UnwindSafe for BitcoinNetwork
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.