pub enum Value {
Show 15 variants
String(String),
Number(f64),
Boolean(bool),
DateTime(DateTime<Utc>),
DateTimeWithFixedOffset(DateTime<FixedOffset>),
DateTimeWithNamedTz(String, DateTime<Utc>),
TimeWindow(TimeWindow),
Array(Vec<Value>),
List(Vec<Value>),
Vector(Vec<f32>),
Path(PathValue),
Node(Node),
Edge(Edge),
Temporal(TemporalValue),
Null,
}Expand description
Value types for graph node and edge properties
Variants§
String(String)
Number(f64)
Boolean(bool)
DateTime(DateTime<Utc>)
DateTimeWithFixedOffset(DateTime<FixedOffset>)
DateTimeWithNamedTz(String, DateTime<Utc>)
TimeWindow(TimeWindow)
Array(Vec<Value>)
List(Vec<Value>)
Vector(Vec<f32>)
Path(PathValue)
Node(Node)
Edge(Edge)
Temporal(TemporalValue)
Null
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_boolean(&self) -> Option<bool>
pub fn as_boolean(&self) -> Option<bool>
Extract as boolean if possible
Sourcepub fn as_datetime(&self) -> Option<&DateTime<Utc>>
pub fn as_datetime(&self) -> Option<&DateTime<Utc>>
Extract as datetime if possible (UTC only)
Sourcepub fn as_datetime_with_offset(&self) -> Option<&DateTime<FixedOffset>>
pub fn as_datetime_with_offset(&self) -> Option<&DateTime<FixedOffset>>
Extract as datetime with fixed offset if possible
Sourcepub fn as_datetime_with_named_tz(&self) -> Option<(&str, &DateTime<Utc>)>
pub fn as_datetime_with_named_tz(&self) -> Option<(&str, &DateTime<Utc>)>
Extract as datetime with named timezone if possible
Sourcepub fn as_datetime_utc(&self) -> Option<DateTime<Utc>>
pub fn as_datetime_utc(&self) -> Option<DateTime<Utc>>
Get any datetime as UTC, converting if necessary
Sourcepub fn get_timezone_info(&self) -> Option<String>
pub fn get_timezone_info(&self) -> Option<String>
Get timezone information if available
Sourcepub fn as_list(&self) -> Option<&Vec<Value>>
pub fn as_list(&self) -> Option<&Vec<Value>>
Extract as list (supports both List and Array variants)
Sourcepub fn as_integer(&self) -> Option<i64>
pub fn as_integer(&self) -> Option<i64>
Extract as integer if possible (from number)
Sourcepub fn as_time_window(&self) -> Option<&TimeWindow>
pub fn as_time_window(&self) -> Option<&TimeWindow>
Extract as time window if possible
Sourcepub fn as_temporal(&self) -> Option<&TemporalValue>
pub fn as_temporal(&self) -> Option<&TemporalValue>
Extract as temporal value if possible
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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