Enum bee_message::address::Address [−][src]
#[non_exhaustive] pub enum Address { Ed25519(Ed25519Address), }
A generic address supporting different address kinds.
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.
Ed25519(Ed25519Address)
An Ed25519 address.
Implementations
impl Address
[src]
impl Address
[src]pub fn kind(&self) -> u8
[src]
Returns the address kind of an Address
.
pub fn try_from_bech32(addr: &str) -> Result<Self, Error>
[src]
Tries to create an Address
from a Bech32 encoded string.
pub fn to_bech32(&self, hrp: &str) -> String
[src]
Encodes this address to a Bech32 string with the hrp (human readable part) argument as prefix.
pub fn verify(
&self,
msg: &[u8],
signature: &SignatureUnlock
) -> Result<(), Error>
[src]
&self,
msg: &[u8],
signature: &SignatureUnlock
) -> Result<(), Error>
Verifies a SignatureUnlock
for a message against the Address
.
Trait Implementations
impl From<Ed25519Address> for Address
[src]
impl From<Ed25519Address> for Address
[src]fn from(address: Ed25519Address) -> Self
[src]
impl Packable for Address
[src]
impl Packable for Address
[src]type Error = Error
Associated error type.
fn packed_len(&self) -> usize
[src]
fn pack<W: Write>(&self, writer: &mut W) -> Result<(), Self::Error>
[src]
fn unpack_inner<R: Read + ?Sized, const CHECK: bool>(
reader: &mut R
) -> Result<Self, Self::Error>
[src]
reader: &mut R
) -> Result<Self, Self::Error>
pub fn pack_new(&self) -> Vec<u8, Global>
[src]
pub fn unpack<R>(reader: &mut R) -> Result<Self, Self::Error> where
R: Read + ?Sized,
[src]
R: Read + ?Sized,
pub fn unpack_unchecked<R>(reader: &mut R) -> Result<Self, Self::Error> where
R: Read + ?Sized,
[src]
R: Read + ?Sized,
impl PartialOrd<Address> for Address
[src]
impl PartialOrd<Address> for Address
[src]impl StructuralEq for Address
[src]
impl StructuralEq for Address
[src]impl StructuralPartialEq for Address
[src]
impl StructuralPartialEq for Address
[src]Auto Trait Implementations
impl RefUnwindSafe for Address
impl RefUnwindSafe for Address
impl UnwindSafe for Address
impl UnwindSafe for Address