[][src]Enum forest_address::Payload

pub enum Payload {
    ID(u64),
    Secp256k1([u8; 20]),
    Actor([u8; 20]),
    BLS(BLSPublicKey),
}

Payload is the data of the Address. Variants are the supported Address protocols.

Variants

ID(u64)

ID protocol address.

Secp256k1([u8; 20])

SECP256K1 key address, 20 byte hash of PublicKey

Actor([u8; 20])

Actor protocol address, 20 byte hash of actor data

BLS key address, full 48 byte public key

Implementations

impl Payload[src]

pub fn to_raw_bytes(&self) -> Vec<u8>[src]

Returns encoded bytes of Address without the protocol byte.

pub fn to_bytes(&self) -> Vec<u8>[src]

Returns encoded bytes of Address including the protocol byte.

pub fn new(protocol: Protocol, payload: &[u8]) -> Result<Self, Error>[src]

Generates payload from raw bytes and protocol.

Trait Implementations

impl Clone for Payload[src]

impl Copy for Payload[src]

impl Debug for Payload[src]

impl Eq for Payload[src]

impl<'_> From<&'_ Payload> for Protocol[src]

impl From<Payload> for Protocol[src]

impl Hash for Payload[src]

impl PartialEq<Payload> for Payload[src]

impl StructuralEq for Payload[src]

impl StructuralPartialEq for Payload[src]

Auto Trait Implementations

impl RefUnwindSafe for Payload

impl Send for Payload

impl Sync for Payload

impl Unpin for Payload

impl UnwindSafe for Payload

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.