pub struct Magic(/* private fields */);Expand description
Network magic bytes to identify the cryptocurrency network the message was intended for.
Implementations§
Source§impl Magic
impl Magic
Sourcepub const TESTNET: Self
👎Deprecated since 0.32.4: Use TESTNET3 instead
pub const TESTNET: Self
Bitcoin testnet3 network magic bytes.
Sourcepub fn from_bytes(bytes: [u8; 4]) -> Magic
pub fn from_bytes(bytes: [u8; 4]) -> Magic
Create network magic from bytes.
Sourcepub fn from_params(params: impl AsRef<Params>) -> Self
pub fn from_params(params: impl AsRef<Params>) -> Self
Returns the magic bytes for the network defined by params.
Trait Implementations§
Source§impl Ord for Magic
impl Ord for Magic
Source§impl PartialOrd for Magic
impl PartialOrd for Magic
impl Copy for Magic
impl Eq for Magic
impl StructuralPartialEq for Magic
Auto Trait Implementations§
impl Freeze for Magic
impl RefUnwindSafe for Magic
impl Send for Magic
impl Sync for Magic
impl Unpin for Magic
impl UnwindSafe for Magic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more