pub enum Value<'a> {
Show 13 variants
Bool(bool),
Int64 {
value: i64,
unit: Option<Id>,
},
Float64 {
value: f64,
unit: Option<Id>,
},
Decimal {
exponent: i32,
mantissa: DecimalMantissa<'a>,
unit: Option<Id>,
},
Text {
value: Cow<'a, str>,
language: Option<Id>,
},
Bytes(Cow<'a, [u8]>),
Date(Cow<'a, str>),
Time(Cow<'a, str>),
Datetime(Cow<'a, str>),
Schedule(Cow<'a, str>),
Point {
lat: f64,
lon: f64,
alt: Option<f64>,
},
Rect {
min_lat: f64,
min_lon: f64,
max_lat: f64,
max_lon: f64,
},
Embedding {
sub_type: EmbeddingSubType,
dims: usize,
data: Cow<'a, [u8]>,
},
}Expand description
A typed value that can be stored on an entity or relation.
Variants§
Bool(bool)
Boolean value.
Int64
64-bit signed integer with optional unit.
Float64
64-bit IEEE 754 float (NaN not allowed) with optional unit.
Decimal
Arbitrary-precision decimal: value = mantissa * 10^exponent, with optional unit.
Fields
§
mantissa: DecimalMantissa<'a>Text
UTF-8 text with optional language.
Bytes(Cow<'a, [u8]>)
Opaque byte array.
Date(Cow<'a, str>)
Calendar date in RFC 3339 format (e.g., “2024-01-15” or “2024-01-15+05:30”).
Time(Cow<'a, str>)
Time of day in RFC 3339 format (e.g., “14:30:45.123456Z” or “14:30:45+05:30”).
Datetime(Cow<'a, str>)
Combined date and time in RFC 3339 format (e.g., “2024-01-15T14:30:45.123456Z”).
Schedule(Cow<'a, str>)
RFC 5545 iCalendar schedule string.
Point
WGS84 geographic coordinate with optional altitude.
Fields
Rect
Axis-aligned bounding box in WGS84 coordinates.
Fields
Embedding
Dense vector for semantic similarity search.
Implementations§
Trait Implementations§
impl<'a> StructuralPartialEq for Value<'a>
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'a>
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