pub struct Bits128(pub [u64; 2]);Expand description
A value flowing through the DAG at runtime.
This is the universal runtime representation for all Polydat data.
Every node input and output is a Value. The variant determines
the data type:
| Variant | Rust type | Polydat DSL type | Usage |
|---|---|---|---|
U64 | u64 | u64 | Cycle counters, hashes, IDs, bitwise ops |
F64 | f64 | f64 | Floating point math, distributions, noise |
Bool | bool | bool | Conditions, flags |
Str | String | String | Names, formatted output, templates |
Bytes | Vec<u8> | bytes | Raw binary data, digests |
Json | serde_json::Value | json | Structured data, vectors |
Ext | Box<dyn ReflectedValue> | adapter-specific | CQL UUIDs, timestamps, etc. |
None | — | — | Uninitialized buffer slot (never flows through wiring) |
The assembly phase validates type correctness at compile time.
Runtime code can safely use as_u64(), as_f64(), etc. — a
type mismatch is a compiler bug, not a user error.
Ext enables adapter-contributed types (e.g., uuid::Uuid from
the CQL adapter) to flow through the DAG without the kernel
knowing the concrete type. Any consumer can display, serialize,
or inspect an Ext value via ReflectedValue. The producing
adapter can downcast via as_any().
Two-limb carrier for 128-bit integers inside Value.
Limbs are little-endian ([lo, hi]). Using [u64; 2] instead
of a raw u128/i128 field keeps Value’s alignment at 8 and
its size inside the 40-byte buffer-slot envelope; reassembly is
two register moves.
Tuple Fields§
§0: [u64; 2]Implementations§
Source§impl Bits128
impl Bits128
Sourcepub fn to_le_bytes(self) -> [u8; 16]
pub fn to_le_bytes(self) -> [u8; 16]
The word’s sixteen bytes, little-endian.
Sourcepub fn from_le_bytes(b: [u8; 16]) -> Self
pub fn from_le_bytes(b: [u8; 16]) -> Self
A word from sixteen little-endian bytes.
Trait Implementations§
impl Copy for Bits128
impl Eq for Bits128
impl StructuralPartialEq for Bits128
Source§impl Wire for Bits128
impl Wire for Bits128
Source§const JIT: Option<JitType> = None
const JIT: Option<JitType> = None
Some(_) means the type
rides the Phase-2 u64 buffer; None means typed-eval
only.Source§const RESOLVER: Option<DefaultResolver> = None
const RESOLVER: Option<DefaultResolver> = None
Str-typed upstream wires feeding this slot. None
(the default) disables auto-promotion; the workload must
supply the wire’s actual port type directly. Set via the
Resolved<R, T> marker wrapper.Source§const WIRE_COST: WireCost = crate::ast::WireCost::Data
const WIRE_COST: WireCost = crate::ast::WireCost::Data
WireCost::Data (cheap per-cycle input).
Set to WireCost::Config via the Config<T> marker
wrapper to signal that the wire is rarely-changing and
the compiler should warn on cycle-time binding.Auto Trait Implementations§
impl Freeze for Bits128
impl RefUnwindSafe for Bits128
impl Send for Bits128
impl Sync for Bits128
impl Unpin for Bits128
impl UnsafeUnpin for Bits128
impl UnwindSafe for Bits128
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more