pub struct ByronAddress {
pub payload: TagWrap<ByteVec, 24>,
pub crc: u32,
}Expand description
New type wrapping a Byron address primitive
Fields§
§payload: TagWrap<ByteVec, 24>§crc: u32Implementations§
Source§impl ByronAddress
impl ByronAddress
pub fn new(payload: &[u8], crc: u32) -> ByronAddress
pub fn from_decoded(payload: AddressPayload) -> ByronAddress
pub fn from_bytes(value: &[u8]) -> Result<ByronAddress, Error>
pub fn from_base58(value: &str) -> Result<ByronAddress, Error>
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn to_base58(&self) -> String
pub fn to_hex(&self) -> String
pub fn decode(&self) -> Result<AddressPayload, Error>
Trait Implementations§
Source§impl Clone for ByronAddress
impl Clone for ByronAddress
Source§fn clone(&self) -> ByronAddress
fn clone(&self) -> ByronAddress
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ByronAddress
impl Debug for ByronAddress
Source§impl<'bytes, Ctx> Decode<'bytes, Ctx> for ByronAddress
impl<'bytes, Ctx> Decode<'bytes, Ctx> for ByronAddress
Source§impl<Ctx> Encode<Ctx> for ByronAddress
impl<Ctx> Encode<Ctx> for ByronAddress
Source§impl From<AddressPayload> for ByronAddress
impl From<AddressPayload> for ByronAddress
Source§fn from(value: AddressPayload) -> ByronAddress
fn from(value: AddressPayload) -> ByronAddress
Converts to this type from the input type.
Source§impl From<ByronAddress> for Address
impl From<ByronAddress> for Address
Source§fn from(addr: ByronAddress) -> Address
fn from(addr: ByronAddress) -> Address
Converts to this type from the input type.
Source§impl Hash for ByronAddress
impl Hash for ByronAddress
Source§impl Ord for ByronAddress
impl Ord for ByronAddress
Source§fn cmp(&self, other: &ByronAddress) -> Ordering
fn cmp(&self, other: &ByronAddress) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ByronAddress
impl PartialEq for ByronAddress
Source§impl PartialOrd for ByronAddress
impl PartialOrd for ByronAddress
impl Eq for ByronAddress
impl StructuralPartialEq for ByronAddress
Auto Trait Implementations§
impl Freeze for ByronAddress
impl RefUnwindSafe for ByronAddress
impl Send for ByronAddress
impl Sync for ByronAddress
impl Unpin for ByronAddress
impl UnsafeUnpin for ByronAddress
impl UnwindSafe for ByronAddress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more