Enum Value

Source
pub enum Value<'a> {
Show 16 variants USize(usize), U128(u128), U64(u64), U32(u32), U16(u16), U8(u8), I128(i128), I64(i64), I32(i32), I16(i16), I8(i8), F64(f64), F32(f32), Bool(bool), Uuid(Uuid), Str(&'a str),
}
Expand description

A polymorphic value type for graph element properties.

This enum represents the various types of values that can be stored in graph vertices and edges. It supports numeric types, boolean values, UUIDs, and strings.

The lifetime parameter allows the enum to store borrowed string data.

Variants§

§

USize(usize)

An unsigned size value

§

U128(u128)

A 128-bit unsigned integer

§

U64(u64)

A 64-bit unsigned integer

§

U32(u32)

A 32-bit unsigned integer

§

U16(u16)

A 16-bit unsigned integer

§

U8(u8)

An 8-bit unsigned integer

§

I128(i128)

A 128-bit signed integer

§

I64(i64)

A 64-bit signed integer

§

I32(i32)

A 32-bit signed integer

§

I16(i16)

A 16-bit signed integer

§

I8(i8)

An 8-bit signed integer

§

F64(f64)

A 64-bit floating point number

§

F32(f32)

A 32-bit floating point number

§

Bool(bool)

A boolean value

§

Uuid(Uuid)

A UUID

§

Str(&'a str)

A string slice

Trait Implementations§

Source§

impl<'a> Clone for Value<'a>

Source§

fn clone(&self) -> Value<'a>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> From<&'a &'a String> for Value<'a>

Source§

fn from(value: &'a &'a String) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a &'a str> for Value<'a>

Source§

fn from(value: &'a &'a str) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a String> for Value<'a>

Source§

fn from(value: &'a String) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Uuid> for Value<'a>

Source§

fn from(value: &'a Uuid) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a bool> for Value<'a>

Source§

fn from(value: &'a bool) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a f32> for Value<'a>

Source§

fn from(value: &'a f32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a f64> for Value<'a>

Source§

fn from(value: &'a f64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a i128> for Value<'a>

Source§

fn from(value: &'a i128) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a i16> for Value<'a>

Source§

fn from(value: &'a i16) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a i32> for Value<'a>

Source§

fn from(value: &'a i32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a i64> for Value<'a>

Source§

fn from(value: &'a i64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a i8> for Value<'a>

Source§

fn from(value: &'a i8) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut &'a String> for Value<'a>

Source§

fn from(value: &'a mut &'a String) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut &'a str> for Value<'a>

Source§

fn from(value: &'a mut &'a str) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut Uuid> for Value<'a>

Source§

fn from(value: &'a mut Uuid) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut bool> for Value<'a>

Source§

fn from(value: &'a mut bool) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut f32> for Value<'a>

Source§

fn from(value: &'a mut f32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut f64> for Value<'a>

Source§

fn from(value: &'a mut f64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut i128> for Value<'a>

Source§

fn from(value: &'a mut i128) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut i16> for Value<'a>

Source§

fn from(value: &'a mut i16) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut i32> for Value<'a>

Source§

fn from(value: &'a mut i32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut i64> for Value<'a>

Source§

fn from(value: &'a mut i64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut i8> for Value<'a>

Source§

fn from(value: &'a mut i8) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut u128> for Value<'a>

Source§

fn from(value: &'a mut u128) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut u16> for Value<'a>

Source§

fn from(value: &'a mut u16) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut u32> for Value<'a>

Source§

fn from(value: &'a mut u32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut u64> for Value<'a>

Source§

fn from(value: &'a mut u64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut u8> for Value<'a>

Source§

fn from(value: &'a mut u8) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a str> for Value<'a>

Source§

fn from(value: &'a str) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a u128> for Value<'a>

Source§

fn from(value: &'a u128) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a u16> for Value<'a>

Source§

fn from(value: &'a u16) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a u32> for Value<'a>

Source§

fn from(value: &'a u32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a u64> for Value<'a>

Source§

fn from(value: &'a u64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a u8> for Value<'a>

Source§

fn from(value: &'a u8) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Uuid> for Value<'a>

Source§

fn from(value: Uuid) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<bool> for Value<'a>

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<f32> for Value<'a>

Source§

fn from(value: f32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<f64> for Value<'a>

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<i128> for Value<'a>

Source§

fn from(value: i128) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<i16> for Value<'a>

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<i32> for Value<'a>

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<i64> for Value<'a>

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<i8> for Value<'a>

Source§

fn from(value: i8) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<u128> for Value<'a>

Source§

fn from(value: u128) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<u16> for Value<'a>

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<u32> for Value<'a>

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<u64> for Value<'a>

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<u8> for Value<'a>

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.