Trait eth_types::ToScalar

source ·
pub trait ToScalar<F> {
    // Required method
    fn to_scalar(&self) -> Option<F>;
}
Expand description

Trait used to define types that can be converted to a 256 bit scalar value.

Required Methods§

source

fn to_scalar(&self) -> Option<F>

Convert the type to a scalar value.

Implementations on Foreign Types§

source§

impl<F: Field> ToScalar<F> for bool

source§

fn to_scalar(&self) -> Option<F>

source§

impl<F: Field> ToScalar<F> for u64

source§

fn to_scalar(&self) -> Option<F>

source§

impl<F: Field> ToScalar<F> for usize

source§

fn to_scalar(&self) -> Option<F>

Implementors§