pub trait TowerLevel: Field + Sealed {
type Repr: Copy;
const LOG_BITS: usize;
// Required methods
fn from_repr(r: Self::Repr) -> Self;
fn to_repr(self) -> Self::Repr;
fn mul_alpha(self) -> Self;
fn from_le_byte_iter(bytes: impl Iterator<Item = u8>) -> Self;
fn cantor_basis(i: usize) -> Self;
}Expand description
One level of the Wiedemann tower. Repr is the backing integer; LOG_BITS is k for GF(2^(2^k)).
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn from_repr(r: Self::Repr) -> Self
fn from_repr(r: Self::Repr) -> Self
Build an element from a bit pattern, discarding the bits above 2^LOG_BITS.
Sourcefn from_le_byte_iter(bytes: impl Iterator<Item = u8>) -> Self
fn from_le_byte_iter(bytes: impl Iterator<Item = u8>) -> Self
Build an element from the next RawDataSerializable::NUM_BYTES bytes of a
little-endian byte stream, discarding the bits above 2^LOG_BITS.
§Panics
Panics if the stream ends before a whole element has been read.
Sourcefn cantor_basis(i: usize) -> Self
fn cantor_basis(i: usize) -> Self
The i-th vector of the Cantor basis of this level.
§Panics
Panics if i is at least the bit width 2^LOG_BITS of this level.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".