Skip to main content

Coordinates

Trait Coordinates 

Source
pub unsafe trait Coordinates:
    Copy
    + Send
    + Sync
    + 'static {
    const COORDINATES: usize;
}
Expand description

A value whose bytes are a run of F_2 coordinates, lowest coordinate first.

§Safety

An implementor is a transparent wrapper over an unsigned integer, or over a block of them. Every bit pattern of its bytes is a value, so a run has no padding and no invalid state.

The coordinate count is the size in bits, with nothing left over:

    COORDINATES == 8 * size_of::<Self>()

A value carrying more bytes than that would read past the source of a copy. On a little-endian target coordinate j of a run is bit j % 8 of its byte j / 8.

Required Associated Constants§

Source

const COORDINATES: usize

Coordinates one value of this type holds.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Coordinates for BinaryField8

Source§

impl Coordinates for BinaryField16

Source§

impl Coordinates for BinaryField32

Source§

impl Coordinates for BinaryField64

Source§

impl Coordinates for BinaryField128

Source§

impl<U: Underlier> Coordinates for PackedGf2<U>

Source§

const COORDINATES: usize = U::BITS

Implementors§