Ring

Trait Ring 

Source
pub trait Ring: Additive + Multiplicative {
    // Required method
    fn one() -> Self;

    // Provided method
    fn exp(&self, bits_le: &[u64]) -> Self { ... }
}
Expand description

An instance of a mathematical Ring.

This combines Additive and Multiplicative, and introduces a neutral element for multiplication, Ring::one.

Required Methods§

Source

fn one() -> Self

The neutral element for multiplication.

Multiplying by this element does nothing.

Provided Methods§

Source

fn exp(&self, bits_le: &[u64]) -> Self

Exponentiate this number by a positive integer.

To support arbitrary positive integers, we expect to see 64 bit limbs in little endian order.

For example, for a 256 bit integer, we expect a slice of 4 elements, starting with the lowest 64 bits.

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§

Source§

impl Ring for F