[−][src]Trait earth_codec::AddressCodec
A trait providing an interface for encoding and decoding the Address
struct
for each address scheme.
Associated Types
type Error
Required methods
fn encode(
raw: &[u8],
hash_type: HashType,
network: Network
) -> Result<String, Self::Error>
raw: &[u8],
hash_type: HashType,
network: Network
) -> Result<String, Self::Error>
Attempt to convert the raw address bytes to a string
fn decode(s: &str) -> Result<Address, Self::Error>
Attempt to convert the address string to bytes
Implementors
impl AddressCodec for Base58Codec
[src]
type Error = Base58Error
fn encode(
raw: &[u8],
hash_type: HashType,
network: Network
) -> Result<String, Self::Error>
[src]
raw: &[u8],
hash_type: HashType,
network: Network
) -> Result<String, Self::Error>
fn decode(addr_str: &str) -> Result<Address, Self::Error>
[src]
impl AddressCodec for CashAddrCodec
[src]
type Error = CashAddrError
fn encode(
raw: &[u8],
hash_type: HashType,
network: Network
) -> Result<String, Self::Error>
[src]
raw: &[u8],
hash_type: HashType,
network: Network
) -> Result<String, Self::Error>