Trait gadgets::util::Scalar

source ·
pub trait Scalar<F: Field> {
    // Required method
    fn scalar(&self) -> F;
}
Expand description

Trait that implements functionality to get a scalar from commonly used types.

Required Methods§

source

fn scalar(&self) -> F

Returns a scalar for the type.

Implementations on Foreign Types§

source§

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

source§

fn scalar(&self) -> F

source§

impl<F: Field> Scalar<F> for i32

source§

fn scalar(&self) -> F

source§

impl<F: Field> Scalar<F> for isize

source§

fn scalar(&self) -> F

source§

impl<F: Field> Scalar<F> for &F

source§

fn scalar(&self) -> F

source§

impl<F: Field> Scalar<F> for u8

source§

fn scalar(&self) -> F

source§

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

source§

fn scalar(&self) -> F

source§

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

source§

fn scalar(&self) -> F

source§

impl<F: Field> Scalar<F> for OpcodeId

source§

fn scalar(&self) -> F

Implementors§