Enum digibyte::network::constants::Network [−][src]
pub enum Network { Digibyte, Testnet, Signet, Regtest, }
The cryptocurrency to act on
Variants
Classic Bitcoin
Bitcoin’s testnet
Bitcoin’s signet
Bitcoin’s regtest
Implementations
impl Network
[src]
impl Network
[src]pub fn from_magic(magic: u32) -> Option<Network>
[src]
Creates a Network
from the magic bytes.
Examples
use bitcoin::network::constants::Network; assert_eq!(Some(Network::Bitcoin), Network::from_magic(0xD9B4BEF9)); assert_eq!(None, Network::from_magic(0xFFFFFFFF));
pub fn magic(self) -> u32
[src]
Return the network magic bytes, which should be encoded little-endian at the start of every message
Examples
use bitcoin::network::constants::Network; let network = Network::Bitcoin; assert_eq!(network.magic(), 0xD9B4BEF9);
Trait Implementations
impl PartialOrd<Network> for Network
[src]
impl PartialOrd<Network> for Network
[src]impl StructuralEq for Network
[src]
impl StructuralEq for Network
[src]impl StructuralPartialEq for Network
[src]
impl StructuralPartialEq for Network
[src]Auto Trait Implementations
impl RefUnwindSafe for Network
impl RefUnwindSafe for Network
impl UnwindSafe for Network
impl UnwindSafe for Network