[−][src]Enum lnpbp::chain::Chain
A set of recommended standard networks. Differs from bitcoin::Network in ability to support non-standard and non-predefined networks
Variants (Non-exhaustive)
Bitcoin mainnet
Bitcoin testnet version 3
Regtest(BlockHash)
Bitcoin regtest network, with provided genesis hash to distinguish different private networks
Default bitcoin signet network
SignetCustom(BlockHash)
Some private bitcoin signet network, with provided genesis hash to distinguish private networks from each other
Liquidv1 sidechain & network by Blockstream
Other(ChainParams)
All other networks/chains, providing full information on chain parameters
Implementations
impl Chain
[src]
pub fn chain_params(&self) -> ChainParams
[src]
Returns chain parameters ChainParams for a given chain id
pub fn as_genesis_hash(&self) -> &BlockHash
[src]
Returns hash of genesis block
pub fn from_genesis_hash(hash: &BlockHash) -> Option<Self>
[src]
Gueses chain from the given genesis block hash, returning Option::None if the hash is unknown. This implies that for custom signet and some regtest networks with modified genesis the function will fail.
Trait Implementations
impl Clone for Chain
[src]
impl Debug for Chain
[src]
impl Default for Chain
[src]
impl Display for Chain
[src]
impl Eq for Chain
[src]
impl From<ChainParams> for Chain
[src]
fn from(params: ChainParams) -> Self
[src]
impl From<Network> for Chain
[src]
impl FromStr for Chain
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Hash for Chain
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Chain
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Chain> for Chain
[src]
impl PartialOrd<Chain> for Chain
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StrictDecode for Chain
[src]
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
[src]
pub fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
[src]
impl StrictEncode for Chain
[src]
Auto Trait Implementations
impl RefUnwindSafe for Chain
[src]
impl Send for Chain
[src]
impl Sync for Chain
[src]
impl Unpin for Chain
[src]
impl UnwindSafe for Chain
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,