pub trait TypedCurve {
const CURVE_TYPE: &str;
// Provided methods
fn to_base58(bytes: impl AsRef<[u8]>) -> String { ... }
fn parse_base58<const N: usize>(
s: impl AsRef<str>,
) -> Result<[u8; N], ParseCurveError> { ... }
}Expand description
Helper trait to encode/decode bytes as <CURVE>:<base58>
Required Associated Constants§
Sourceconst CURVE_TYPE: &str
const CURVE_TYPE: &str
Used as prefix: <CURVE>:...
Provided Methods§
Sourcefn parse_base58<const N: usize>(
s: impl AsRef<str>,
) -> Result<[u8; N], ParseCurveError>
fn parse_base58<const N: usize>( s: impl AsRef<str>, ) -> Result<[u8; N], ParseCurveError>
Decodes bytes from string as <CURVE>:<base58>
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.