darkfi_sdk::crypto::util

Trait FieldElemAsStr

Source
pub trait FieldElemAsStr: PrimeField<Repr = [u8; 32]> {
    // Provided methods
    fn to_string(&self) -> String { ... }
    fn from_str(hex: &str) -> GenericResult<Self> { ... }
}

Provided Methods§

Source

fn to_string(&self) -> String

Source

fn from_str(hex: &str) -> GenericResult<Self>

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.

Implementations on Foreign Types§

Source§

impl FieldElemAsStr for Base

Source§

impl FieldElemAsStr for Scalar

Implementors§