[][src]Struct forest_address::Address

pub struct Address { /* fields omitted */ }

Address is the struct that defines the protocol and data payload conversion from either a public key or value

Implementations

impl Address[src]

pub fn from_bytes(bz: &[u8]) -> Result<Self, Error>[src]

Creates address from encoded bytes

pub fn new_id(id: u64) -> Self[src]

Generates new address using ID protocol

pub fn new_secp256k1(pubkey: &[u8]) -> Result<Self, Error>[src]

Generates new address using Secp256k1 pubkey

pub fn new_actor(data: &[u8]) -> Self[src]

Generates new address using the Actor protocol

pub fn new_bls(pubkey: &[u8]) -> Result<Self, Error>[src]

Generates new address using BLS pubkey

pub fn protocol(&self) -> Protocol[src]

Returns protocol for Address

pub fn payload(&self) -> &Payload[src]

Returns the Payload object from the address, where the respective protocol data is kept in an enum separated by protocol

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

Returns the raw bytes data payload of the Address

pub fn network(&self) -> Network[src]

Returns network configuration of Address

pub fn set_network(&mut self, network: Network) -> &mut Self[src]

Sets the network for the address and returns a mutable reference to it

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

Returns encoded bytes of Address

Trait Implementations

impl Cbor for Address[src]

impl Clone for Address[src]

impl Copy for Address[src]

impl Debug for Address[src]

impl<'de> Deserialize<'de> for Address[src]

impl Display for Address[src]

impl Eq 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 PartialEq<Address> for Address[src]

impl Serialize for Address[src]

impl StructuralEq for Address[src]

impl StructuralPartialEq for Address[src]

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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> ToString for T where
    T: Display + ?Sized
[src]

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.