[−][src]Struct forest_address::Address
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]
fn marshal_cbor(&self) -> Result<Vec<u8>, Error>
[src]
fn unmarshal_cbor(bz: &[u8]) -> Result<Self, Error>
[src]
fn cid(&self) -> Result<Cid, Error>
[src]
impl Clone for Address
[src]
impl Copy for Address
[src]
impl Debug for Address
[src]
impl<'de> Deserialize<'de> for Address
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
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.
fn from_str(addr: &str) -> Result<Self, Error>
[src]
impl Hash for Address
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,