#[non_exhaustive]pub enum Value {
Show 29 variants
Bool(bool),
Int(i64),
Uint(u64),
Int128(i128),
Uint128(u128),
Float(f64),
Float32(f32),
Decimal(Decimal),
String(DbString),
Bytes(Arc<[u8]>),
List(Vec<Value>),
Record(Box<Record>),
RecordTyped(Box<RecordTyped>),
Path(Box<Path>),
NodeRef(NodeId),
EdgeRef(EdgeId),
GraphRef(GraphId),
TableRef(BindingTableId),
ZonedDateTime(Box<Zoned>),
LocalDateTime(DateTime),
Date(Date),
ZonedTime(Box<Zoned>),
LocalTime(Time),
Duration(Box<Span>),
Extended {
type_id: ExtensionTypeId,
payload: Arc<[u8]>,
},
Null,
Uuid(Uuid),
Vector(VectorValue),
Json(JsonValue),
}Expand description
In-memory representation of a GQL value.
IA001: default floating-point arithmetic is IEEE 754 binary64; Float32
remains distinct for schema storage. Rust equality preserves GQL’s
+0.0 == -0.0 behavior, while NaN ordering is handled by query-engine
ORDER BY logic outside this crate.
Value equality matches IEEE 754 for non-NaN AND treats all NaN bit-patterns
as equal for round-trip integrity. This is the internal Rust-level equality
used by PropertyMap serde round-trip and snapshot diffs. The GQL =
operator is intercepted at the runtime layer (runtime::value_compare)
and preserves ISO 3VL semantics — NaN = NaN returns NULL there.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bool(bool)
Boolean value.
Int(i64)
Signed integer up to 64 bits.
Uint(u64)
Unsigned integer up to 64 bits.
Int128(i128)
Signed 128-bit integer.
Uint128(u128)
Unsigned 128-bit integer.
Float(f64)
Default floating-point value.
Float32(f32)
Distinct 32-bit floating-point value.
Decimal(Decimal)
Fixed-precision decimal value.
String(DbString)
String value.
Bytes(Arc<[u8]>)
Byte-string value.
List(Vec<Value>)
List value.
Record(Box<Record>)
Open record value.
RecordTyped(Box<RecordTyped>)
Closed record value tied to a graph-type-defined record type.
Path(Box<Path>)
Path value.
Boxed (CORE-06): an inline Path is 120 B and was the size_of::<Value>
ceiling. Paths are ephemeral traversal results, rarely stored, so moving
one behind a pointer shrinks every Value clone/move to a pointer copy.
NodeRef(NodeId)
Node reference value.
EdgeRef(EdgeId)
Edge reference value.
GraphRef(GraphId)
Graph reference value.
TableRef(BindingTableId)
Binding-table reference value.
ZonedDateTime(Box<Zoned>)
Zoned datetime value.
Boxed (CORE-06): jiff::Zoned is 40 B; temporal values are uncommon in
hot graph data, so the indirection is paid only on temporal access.
LocalDateTime(DateTime)
Local datetime value.
Date(Date)
Date value.
ZonedTime(Box<Zoned>)
Zoned time value.
jiff 0.2 has no dedicated zoned-time type, so selene-core uses
jiff::Zoned; date components are ignored at the GQL boundary.
Boxed (CORE-06): see Value::ZonedDateTime.
LocalTime(Time)
Local time value.
Duration(Box<Span>)
Duration value.
Boxed (CORE-06): jiff::Span is 64 B (the largest time variant); boxing
it keeps the post-Path ceiling off Value.
Extended
Extension-owned opaque payload.
Fields
type_id: ExtensionTypeIdRegistered extension type ID.
Null
Null value.
Uuid(Uuid)
UUID value.
Vector(VectorValue)
Native dense vector value.
Json(JsonValue)
Native JSON value.
Implementations§
Source§impl Value
impl Value
Sourcepub const ALL: &[fn() -> Self]
pub const ALL: &[fn() -> Self]
Factory table with one sample value for each Value variant.
The table is used by tests as an append-only ANCHOR: adding a new variant requires adding one factory here so the source-of-truth crate owns the variant census.
Sourcepub const VARIANT_COUNT: usize
pub const VARIANT_COUNT: usize
Number of known Value variants in this build.
Sourcepub fn variant_name(&self) -> &'static str
pub fn variant_name(&self) -> &'static str
Stable telemetry name for this value variant.
This match is exhaustive in selene-core, so a future variant addition
forces the defining crate to choose the new public name once.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.