Struct fvm_shared::address::Address
source · pub struct Address { /* private fields */ }
Expand description
Address is the struct that defines the protocol and data payload conversion from either a public key or value
Implementations§
source§impl Address
impl Address
sourcepub fn from_bytes(bz: &[u8]) -> Result<Self, Error>
pub fn from_bytes(bz: &[u8]) -> Result<Self, Error>
Creates address from encoded bytes.
sourcepub fn new_secp256k1(pubkey: &[u8]) -> Result<Self, Error>
pub fn new_secp256k1(pubkey: &[u8]) -> Result<Self, Error>
Generates new address using Secp256k1 pubkey.
sourcepub fn new_delegated(ns: ActorID, subaddress: &[u8]) -> Result<Self, Error>
pub fn new_delegated(ns: ActorID, subaddress: &[u8]) -> Result<Self, Error>
Generates a new delegated address from a namespace and a subaddress.
pub fn is_bls_zero_address(&self) -> bool
sourcepub fn payload(&self) -> &Payload
pub fn payload(&self) -> &Payload
Returns the Payload
object from the address, where the respective protocol data is kept
in an enum separated by protocol
sourcepub fn into_payload(self) -> Payload
pub fn into_payload(self) -> Payload
Converts Address into Payload
object, where the respective protocol data is kept
in an enum separated by protocol
sourcepub fn payload_bytes(&self) -> Vec<u8> ⓘ
pub fn payload_bytes(&self) -> Vec<u8> ⓘ
Returns the raw bytes data payload of the Address
Trait Implementations§
source§impl<'de> Deserialize<'de> for Address
impl<'de> Deserialize<'de> for Address
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Address
impl Ord for Address
source§impl PartialEq<Address> for Address
impl PartialEq<Address> for Address
source§impl PartialOrd<Address> for Address
impl PartialOrd<Address> for Address
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Address
impl Eq for Address
impl StructuralEq for Address
impl StructuralPartialEq for Address
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§
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