pub enum PropertyValue {
}Expand description
A property value that can be stored on nodes or edges.
Variants§
Null
Null value.
Bool(bool)
Boolean value.
I64(i64)
64-bit signed integer.
DateTime(i64)
UTC datetime stored as epoch milliseconds.
F64(f64)
64-bit floating point.
F32(f32)
32-bit floating point.
String(String)
UTF-8 string.
Bytes(Vec<u8>)
Raw bytes.
I64Array(Vec<i64>)
Array of i64 values.
F64Array(Vec<f64>)
Array of f64 values.
F32Array(Vec<f32>)
Array of f32 values.
StringArray(Vec<String>)
Array of strings.
Array(Vec<PropertyValue>)
Heterogeneous array.
Object(BTreeMap<String, PropertyValue>)
Object/map value.
Implementations§
Source§impl PropertyValue
impl PropertyValue
Sourcepub fn array<V>(values: impl IntoIterator<Item = V>) -> PropertyValuewhere
V: Into<PropertyValue>,
pub fn array<V>(values: impl IntoIterator<Item = V>) -> PropertyValuewhere
V: Into<PropertyValue>,
Create a heterogeneous array value.
Sourcepub fn object<K, V>(values: impl IntoIterator<Item = (K, V)>) -> PropertyValue
pub fn object<K, V>(values: impl IntoIterator<Item = (K, V)>) -> PropertyValue
Create an object/map value.
Sourcepub fn datetime_millis(millis: i64) -> PropertyValue
pub fn datetime_millis(millis: i64) -> PropertyValue
Create a datetime value from UTC epoch milliseconds.
Sourcepub fn as_datetime_millis(&self) -> Option<i64>
pub fn as_datetime_millis(&self) -> Option<i64>
Get datetime as UTC epoch milliseconds.
Sourcepub fn as_array(&self) -> Option<&[PropertyValue]>
pub fn as_array(&self) -> Option<&[PropertyValue]>
Get value as array reference.
Trait Implementations§
Source§impl Clone for PropertyValue
impl Clone for PropertyValue
Source§fn clone(&self) -> PropertyValue
fn clone(&self) -> PropertyValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PropertyValue
impl Debug for PropertyValue
Source§impl<'de> Deserialize<'de> for PropertyValue
impl<'de> Deserialize<'de> for PropertyValue
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PropertyValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PropertyValue, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&str> for PropertyValue
impl From<&str> for PropertyValue
Source§fn from(value: &str) -> PropertyValue
fn from(value: &str) -> PropertyValue
Converts to this type from the input type.
Source§impl From<BTreeMap<String, PropertyValue>> for PropertyValue
impl From<BTreeMap<String, PropertyValue>> for PropertyValue
Source§fn from(value: BTreeMap<String, PropertyValue>) -> PropertyValue
fn from(value: BTreeMap<String, PropertyValue>) -> PropertyValue
Converts to this type from the input type.
Source§impl From<DateTime> for PropertyValue
impl From<DateTime> for PropertyValue
Source§fn from(value: DateTime) -> PropertyValue
fn from(value: DateTime) -> PropertyValue
Converts to this type from the input type.
Source§impl From<HashMap<String, PropertyValue>> for PropertyValue
impl From<HashMap<String, PropertyValue>> for PropertyValue
Source§fn from(value: HashMap<String, PropertyValue>) -> PropertyValue
fn from(value: HashMap<String, PropertyValue>) -> PropertyValue
Converts to this type from the input type.
Source§impl From<String> for PropertyValue
impl From<String> for PropertyValue
Source§fn from(value: String) -> PropertyValue
fn from(value: String) -> PropertyValue
Converts to this type from the input type.
Source§impl From<Vec<PropertyValue>> for PropertyValue
impl From<Vec<PropertyValue>> for PropertyValue
Source§fn from(value: Vec<PropertyValue>) -> PropertyValue
fn from(value: Vec<PropertyValue>) -> PropertyValue
Converts to this type from the input type.
Source§impl From<bool> for PropertyValue
impl From<bool> for PropertyValue
Source§fn from(value: bool) -> PropertyValue
fn from(value: bool) -> PropertyValue
Converts to this type from the input type.
Source§impl From<f32> for PropertyValue
impl From<f32> for PropertyValue
Source§fn from(value: f32) -> PropertyValue
fn from(value: f32) -> PropertyValue
Converts to this type from the input type.
Source§impl From<f64> for PropertyValue
impl From<f64> for PropertyValue
Source§fn from(value: f64) -> PropertyValue
fn from(value: f64) -> PropertyValue
Converts to this type from the input type.
Source§impl From<i32> for PropertyValue
impl From<i32> for PropertyValue
Source§fn from(value: i32) -> PropertyValue
fn from(value: i32) -> PropertyValue
Converts to this type from the input type.
Source§impl From<i64> for PropertyValue
impl From<i64> for PropertyValue
Source§fn from(value: i64) -> PropertyValue
fn from(value: i64) -> PropertyValue
Converts to this type from the input type.
Source§impl PartialEq for PropertyValue
impl PartialEq for PropertyValue
Source§impl Serialize for PropertyValue
impl Serialize for PropertyValue
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PropertyValue
Auto Trait Implementations§
impl Freeze for PropertyValue
impl RefUnwindSafe for PropertyValue
impl Send for PropertyValue
impl Sync for PropertyValue
impl Unpin for PropertyValue
impl UnsafeUnpin for PropertyValue
impl UnwindSafe for PropertyValue
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