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.

An Ed25519 address.

Implementations

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]

Verifies a SignatureUnlock for a message against the Address.

Trait Implementations

impl Clone for Address[src]

impl Copy for Address[src]

impl Debug for Address[src]

impl Eq for Address[src]

impl From<Ed25519Address> for Address[src]

impl FromStr for Address[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for Address[src]

impl Ord for Address[src]

impl Packable for Address[src]

type Error = Error

Associated error type.

impl PartialEq<Address> for Address[src]

impl PartialOrd<Address> for Address[src]

impl StructuralEq for Address[src]

impl StructuralPartialEq for Address[src]

impl TryFrom<String> for Address[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Address

impl Send for Address

impl Sync for Address

impl Unpin for Address

impl UnwindSafe for Address

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.