snarkvm_fields::traits

Trait SquareRootField

Source
pub trait SquareRootField: Field {
    // Required methods
    fn legendre(&self) -> LegendreSymbol;
    fn sqrt(&self) -> Option<Self>;
    fn sqrt_in_place(&mut self) -> Option<&mut Self>;
}
Expand description

The interface for a field that supports an efficient square-root operation.

Required Methods§

Source

fn legendre(&self) -> LegendreSymbol

Returns the Legendre symbol.

Source

fn sqrt(&self) -> Option<Self>

Returns the square root of self, if it exists.

Source

fn sqrt_in_place(&mut self) -> Option<&mut Self>

Sets self to be the square root of self, if it exists.

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§