[−][src]Enum lnpbp::bp::chain::P2pNetworkId
P2P network magic number: prefix identifying network on which node operates. This enum defines known magic network numbers, plus adds support to arbitrary unknown with P2pNetworkId::Other variant. This enum differs from bitcoin::Network in its ability to support non-standard and non-predefined networks
Variants (Non-exhaustive)
Bitcoin magic number for mainnet P2P communications
Bitcoin magic number for testnet P2P communications
Bitcoin magic number for regtest P2P communications
Bitcoin magic number for signet P2P communications
Other(P2pMagicNumber)
Other magic number, implying some unknown network
Implementations
impl P2pNetworkId
[src]
pub fn from_magic(magic: P2pMagicNumber) -> Self
[src]
pub fn as_magic(&self) -> P2pMagicNumber
[src]
Trait Implementations
impl Clone for P2pNetworkId
[src]
fn clone(&self) -> P2pNetworkId
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for P2pNetworkId
[src]
impl Debug for P2pNetworkId
[src]
impl Display for P2pNetworkId
[src]
impl Eq for P2pNetworkId
[src]
impl From<Network> for P2pNetworkId
[src]
impl From<P2pNetworkId> for P2pMagicNumber
[src]
fn from(network: P2pNetworkId) -> Self
[src]
impl From<u32> for P2pNetworkId
[src]
fn from(magic: P2pMagicNumber) -> Self
[src]
impl Hash for P2pNetworkId
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for P2pNetworkId
[src]
fn cmp(&self, other: &P2pNetworkId) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<P2pNetworkId> for P2pNetworkId
[src]
fn eq(&self, other: &P2pNetworkId) -> bool
[src]
fn ne(&self, other: &P2pNetworkId) -> bool
[src]
impl PartialOrd<P2pNetworkId> for P2pNetworkId
[src]
fn partial_cmp(&self, other: &P2pNetworkId) -> Option<Ordering>
[src]
fn lt(&self, other: &P2pNetworkId) -> bool
[src]
fn le(&self, other: &P2pNetworkId) -> bool
[src]
fn gt(&self, other: &P2pNetworkId) -> bool
[src]
fn ge(&self, other: &P2pNetworkId) -> bool
[src]
impl StrictDecode for P2pNetworkId
[src]
type Error = Error
Implementation-dependent error type
fn strict_decode<D: Read>(d: D) -> Result<Self, Self::Error>
[src]
impl StrictEncode for P2pNetworkId
[src]
type Error = Error
Implementation-dependent error type
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Self::Error>
[src]
impl StructuralEq for P2pNetworkId
[src]
impl StructuralPartialEq for P2pNetworkId
[src]
impl TryFrom<P2pNetworkId> for Network
[src]
type Error = ConversionImpossibleError
The type returned in the event of a conversion error.
fn try_from(bn: P2pNetworkId) -> Result<Self, Self::Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for P2pNetworkId
impl Send for P2pNetworkId
impl Sync for P2pNetworkId
impl Unpin for P2pNetworkId
impl UnwindSafe for P2pNetworkId
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,
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> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,