pub struct GroundedCoord { /* private fields */ }Expand description
A single grounded coordinate value.
Not a Datum [this is the narrow intermediate that a Grounding
impl produces]. The foundation validates and mints it into a Datum.
Uses the same closed level-tagged family as Datum, ensuring that
coordinate width matches the target Witt level.
§Examples
use uor_foundation::enforcement::GroundedCoord;
// W8: 8-bit ring Z/256Z — lightweight, exhaustive-verification baseline
let byte_coord = GroundedCoord::w8(42);
// W16: 16-bit ring Z/65536Z — audio samples, small indices
let short_coord = GroundedCoord::w16(1000);
// W32: 32-bit ring Z/2^32Z — pixel data, general-purpose integers
let word_coord = GroundedCoord::w32(70_000);Implementations§
Source§impl GroundedCoord
impl GroundedCoord
Sourcepub const fn w8(value: u8) -> GroundedCoord
pub const fn w8(value: u8) -> GroundedCoord
Construct a W8 coordinate from a u8 value (little-endian).
Sourcepub const fn w16(value: u16) -> GroundedCoord
pub const fn w16(value: u16) -> GroundedCoord
Construct a W16 coordinate from a u16 value (little-endian).
Sourcepub const fn w24(value: u32) -> GroundedCoord
pub const fn w24(value: u32) -> GroundedCoord
Construct a W24 coordinate from a u32 value (little-endian).
Sourcepub const fn w32(value: u32) -> GroundedCoord
pub const fn w32(value: u32) -> GroundedCoord
Construct a W32 coordinate from a u32 value (little-endian).
Sourcepub const fn w40(value: u64) -> GroundedCoord
pub const fn w40(value: u64) -> GroundedCoord
Construct a W40 coordinate from a u64 value (little-endian).
Sourcepub const fn w48(value: u64) -> GroundedCoord
pub const fn w48(value: u64) -> GroundedCoord
Construct a W48 coordinate from a u64 value (little-endian).
Sourcepub const fn w56(value: u64) -> GroundedCoord
pub const fn w56(value: u64) -> GroundedCoord
Construct a W56 coordinate from a u64 value (little-endian).
Sourcepub const fn w64(value: u64) -> GroundedCoord
pub const fn w64(value: u64) -> GroundedCoord
Construct a W64 coordinate from a u64 value (little-endian).
Sourcepub const fn w72(value: u128) -> GroundedCoord
pub const fn w72(value: u128) -> GroundedCoord
Construct a W72 coordinate from a u128 value (little-endian).
Sourcepub const fn w80(value: u128) -> GroundedCoord
pub const fn w80(value: u128) -> GroundedCoord
Construct a W80 coordinate from a u128 value (little-endian).
Sourcepub const fn w88(value: u128) -> GroundedCoord
pub const fn w88(value: u128) -> GroundedCoord
Construct a W88 coordinate from a u128 value (little-endian).
Sourcepub const fn w96(value: u128) -> GroundedCoord
pub const fn w96(value: u128) -> GroundedCoord
Construct a W96 coordinate from a u128 value (little-endian).
Sourcepub const fn w104(value: u128) -> GroundedCoord
pub const fn w104(value: u128) -> GroundedCoord
Construct a W104 coordinate from a u128 value (little-endian).
Sourcepub const fn w112(value: u128) -> GroundedCoord
pub const fn w112(value: u128) -> GroundedCoord
Construct a W112 coordinate from a u128 value (little-endian).
Sourcepub const fn w120(value: u128) -> GroundedCoord
pub const fn w120(value: u128) -> GroundedCoord
Construct a W120 coordinate from a u128 value (little-endian).
Sourcepub const fn w128(value: u128) -> GroundedCoord
pub const fn w128(value: u128) -> GroundedCoord
Construct a W128 coordinate from a u128 value (little-endian).
Trait Implementations§
Source§impl Clone for GroundedCoord
impl Clone for GroundedCoord
Source§fn clone(&self) -> GroundedCoord
fn clone(&self) -> GroundedCoord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GroundedCoord
impl Debug for GroundedCoord
Source§impl<Map> GroundingProgramRun<GroundedCoord> for GroundingProgram<GroundedCoord, Map>where
Map: GroundingMapKind,
impl<Map> GroundingProgramRun<GroundedCoord> for GroundingProgram<GroundedCoord, Map>where
Map: GroundingMapKind,
Source§fn run_program(&self, external: &[u8]) -> Option<GroundedCoord>
fn run_program(&self, external: &[u8]) -> Option<GroundedCoord>
Source§impl PartialEq for GroundedCoord
impl PartialEq for GroundedCoord
Source§fn eq(&self, other: &GroundedCoord) -> bool
fn eq(&self, other: &GroundedCoord) -> bool
self and other values to be equal, and is used by ==.