AsBase58

Trait AsBase58 

Source
pub trait AsBase58<const LEN: usize>: Sized {
    // Required methods
    fn inner(&self) -> [u8; LEN];
    fn from_inner(inner: [u8; LEN]) -> Self;

    // Provided methods
    fn to_base58_string(&self, base58prefix: u16) -> String { ... }
    fn from_base58_string(base58_string: &str) -> Result<(Self, u16), Error> { ... }
}

Required Methods§

Source

fn inner(&self) -> [u8; LEN]

Source

fn from_inner(inner: [u8; LEN]) -> Self

Provided Methods§

Source

fn to_base58_string(&self, base58prefix: u16) -> String

Same as to_ss58check_with_version() method for Ss58Codec from sp_core, comments from sp_core.

Source

fn from_base58_string(base58_string: &str) -> Result<(Self, u16), Error>

Same as from_ss58check_with_version() method for Ss58Codec from sp_core, comments from sp_core.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl AsBase58<ACCOUNT_ID_32_LEN> for AccountId32

Source§

impl AsBase58<ECDSA_PUBLIC_LEN> for substrate_crypto_light::ecdsa::Public

Source§

impl AsBase58<ED25519_PUBLIC_LEN> for substrate_crypto_light::ed25519::Public

Source§

impl AsBase58<SR25519_PUBLIC_LEN> for substrate_crypto_light::sr25519::Public