[−][src]Enum sv::network::Network
Network type
Variants
Mainnet
Testnet
Methods
impl Network
[src]
impl Network
pub fn from_u8(x: u8) -> Result<Network>
[src]
pub fn from_u8(x: u8) -> Result<Network>
Converts an integer to a network type
pub fn port(&self) -> u16
[src]
pub fn port(&self) -> u16
Returns the default TCP port
pub fn magic(&self) -> [u8; 4]
[src]
pub fn magic(&self) -> [u8; 4]
Returns the magic bytes for the message headers
pub fn genesis_block(&self) -> Block
[src]
pub fn genesis_block(&self) -> Block
Returns the genesis block
pub fn genesis_hash(&self) -> Hash256
[src]
pub fn genesis_hash(&self) -> Hash256
Returns the genesis block hash
pub fn addr_pubkeyhash_flag(&self) -> u8
[src]
pub fn addr_pubkeyhash_flag(&self) -> u8
Returns the version byte flag for P2PKH-type addresses
pub fn addr_script_flag(&self) -> u8
[src]
pub fn addr_script_flag(&self) -> u8
Returns the version byte flag for P2SH-type addresses
pub fn seeds(&self) -> Vec<String>
[src]
pub fn seeds(&self) -> Vec<String>
Returns a list of DNS seeds for finding initial nodes
ⓘImportant traits for SeedIterpub fn seed_iter(&self) -> SeedIter
[src]
ⓘImportant traits for SeedIter
pub fn seed_iter(&self) -> SeedIter
Creates a new DNS seed iterator for this network
Trait Implementations
impl Clone for Network
[src]
impl Clone for Network
fn clone(&self) -> Network
[src]
fn clone(&self) -> Network
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Network
[src]
impl Copy for Network
impl Eq for Network
[src]
impl Eq for Network
impl PartialEq<Network> for Network
[src]
impl PartialEq<Network> for Network
fn eq(&self, other: &Network) -> bool
[src]
fn eq(&self, other: &Network) -> bool
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Debug for Network
[src]
impl Debug for Network
impl Hash for Network
[src]
impl Hash for Network
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self