[−][src]Enum lnpbp::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)
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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]
pub 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]
pub 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]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<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]
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 P2pNetworkId
[src]
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
[src]
pub fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
[src]
impl StructuralEq for P2pNetworkId
[src]
impl StructuralPartialEq for P2pNetworkId
[src]
Auto Trait Implementations
impl RefUnwindSafe for P2pNetworkId
[src]
impl Send for P2pNetworkId
[src]
impl Sync for P2pNetworkId
[src]
impl Unpin for P2pNetworkId
[src]
impl UnwindSafe for P2pNetworkId
[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>,