[−][src]Struct ergo_lib::chain::address::AddressEncoder
Encodes/Decodes address to/from string
Fields
network_prefix: NetworkPrefix
Network prefix (network type) of the encoder
Implementations
impl AddressEncoder
[src]
pub fn new(network_prefix: NetworkPrefix) -> AddressEncoder
[src]
create a new AddressEncoder for a given network type
pub fn parse_address_from_str(
&self,
str: &str
) -> Result<Address, AddressEncoderError>
[src]
&self,
str: &str
) -> Result<Address, AddressEncoderError>
parse address from Base58 encoded string
pub fn unchecked_parse_network_address_from_str(
str: &str
) -> Result<NetworkAddress, AddressEncoderError>
[src]
str: &str
) -> Result<NetworkAddress, AddressEncoderError>
parse network+address from Base58 encoded string
pub fn unchecked_parse_network_address_from_bytes(
bytes: &[u8]
) -> Result<NetworkAddress, AddressEncoderError>
[src]
bytes: &[u8]
) -> Result<NetworkAddress, AddressEncoderError>
parse network+address from Base58 encoded string
pub fn unchecked_parse_address_from_str(
str: &str
) -> Result<Address, AddressEncoderError>
[src]
str: &str
) -> Result<Address, AddressEncoderError>
parse address from Base58 encoded string
pub fn unchecked_parse_address_from_bytes(
bytes: &[u8]
) -> Result<Address, AddressEncoderError>
[src]
bytes: &[u8]
) -> Result<Address, AddressEncoderError>
parse address from Base58 encoded string
pub fn address_to_str(&self, address: &Address) -> String
[src]
encode address as Base58 encoded string
pub fn encode_address_as_bytes(
network_prefix: NetworkPrefix,
address: &Address
) -> Vec<u8>
[src]
network_prefix: NetworkPrefix,
address: &Address
) -> Vec<u8>
encode address as Base58 encoded string
pub fn encode_address_as_string(
network_prefix: NetworkPrefix,
address: &Address
) -> String
[src]
network_prefix: NetworkPrefix,
address: &Address
) -> String
encode address as Base58 encoded string
Trait Implementations
impl Debug for AddressEncoder
[src]
impl Eq for AddressEncoder
[src]
impl PartialEq<AddressEncoder> for AddressEncoder
[src]
pub fn eq(&self, other: &AddressEncoder) -> bool
[src]
pub fn ne(&self, other: &AddressEncoder) -> bool
[src]
impl StructuralEq for AddressEncoder
[src]
impl StructuralPartialEq for AddressEncoder
[src]
Auto Trait Implementations
impl RefUnwindSafe for AddressEncoder
[src]
impl Send for AddressEncoder
[src]
impl Sync for AddressEncoder
[src]
impl Unpin for AddressEncoder
[src]
impl UnwindSafe for AddressEncoder
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
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<F> TryExtractInto<F> for F
[src]
pub fn try_extract_into<T>(Self) -> Result<T, TryExtractFromError> where
T: TryExtractFrom<F>,
[src]
T: TryExtractFrom<F>,
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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,