pub struct GroundedTuple<const N: usize> { /* private fields */ }Expand description
A grounded tuple: a fixed-size array of GroundedCoord values.
Represents a structured type (e.g., the 8 coordinates of an E8
lattice point). Not a Datum until the foundation validates and
mints it. Stack-resident, no heap allocation.
§Examples
use uor_foundation::enforcement::{GroundedCoord, GroundedTuple};
// A 2D pixel: (red, green) at W8 (8-bit per channel)
let pixel = GroundedTuple::new([
GroundedCoord::w8(255), // red channel
GroundedCoord::w8(128), // green channel
]);
// An E8 lattice point: 8 coordinates at W8
let lattice_point = GroundedTuple::new([
GroundedCoord::w8(2), GroundedCoord::w8(0),
GroundedCoord::w8(0), GroundedCoord::w8(0),
GroundedCoord::w8(0), GroundedCoord::w8(0),
GroundedCoord::w8(0), GroundedCoord::w8(0),
]);Implementations§
Source§impl<const N: usize> GroundedTuple<N>
impl<const N: usize> GroundedTuple<N>
Sourcepub const fn new(coords: [GroundedCoord; N]) -> GroundedTuple<N>
pub const fn new(coords: [GroundedCoord; N]) -> GroundedTuple<N>
Construct a tuple from a fixed-size array of coordinates.
Trait Implementations§
Source§impl<const N: usize> Clone for GroundedTuple<N>
impl<const N: usize> Clone for GroundedTuple<N>
Source§fn clone(&self) -> GroundedTuple<N>
fn clone(&self) -> GroundedTuple<N>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for GroundedTuple<N>
impl<const N: usize> Debug for GroundedTuple<N>
Source§impl<const N: usize, Map> GroundingProgramRun<GroundedTuple<N>> for GroundingProgram<GroundedTuple<N>, Map>where
Map: GroundingMapKind,
impl<const N: usize, Map> GroundingProgramRun<GroundedTuple<N>> for GroundingProgram<GroundedTuple<N>, Map>where
Map: GroundingMapKind,
Source§fn run_program(&self, external: &[u8]) -> Option<GroundedTuple<N>>
fn run_program(&self, external: &[u8]) -> Option<GroundedTuple<N>>
Run the program on external bytes.
Source§impl<const N: usize> PartialEq for GroundedTuple<N>
impl<const N: usize> PartialEq for GroundedTuple<N>
Source§fn eq(&self, other: &GroundedTuple<N>) -> bool
fn eq(&self, other: &GroundedTuple<N>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<const N: usize> Eq for GroundedTuple<N>
impl<const N: usize> GroundedValue for GroundedTuple<N>
impl<const N: usize> StructuralPartialEq for GroundedTuple<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for GroundedTuple<N>
impl<const N: usize> RefUnwindSafe for GroundedTuple<N>
impl<const N: usize> Send for GroundedTuple<N>
impl<const N: usize> Sync for GroundedTuple<N>
impl<const N: usize> Unpin for GroundedTuple<N>
impl<const N: usize> UnsafeUnpin for GroundedTuple<N>
impl<const N: usize> UnwindSafe for GroundedTuple<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more