pub enum AttributeKey {
Boolean(bool),
Int16(i16),
Int32(i32),
Int64(i64),
Int8(i8),
String(String),
UInt16(u16),
UInt32(u32),
UInt64(u64),
UInt8(u8),
Usize(usize),
}Expand description
An enumeration of possible keys for attributes in a graph.
AttributeKey defines various types of keys that are used in Graphster.
Each variant supports the .into() method for easy conversion from the respective data type.
§Examples
use graphster::prelude::AttributeKey;
// Creating AttributeKey instances directly
let key1 = AttributeKey::String("example_key".to_string());
let key2 = AttributeKey::Int32(42);
// Creating AttributeKey instances using .into()
let key3: AttributeKey = "another_key".into();
let key4: AttributeKey = 100u64.into();The variants are:
Boolean(bool): Represents a boolean key.Int8(i8): Represents an 8-bit signed integer key.Int16(i16): Represents a 16-bit signed integer key.Int32(i32): Represents a 32-bit signed integer key.Int64(i64): Represents a 64-bit signed integer key.String(String): Represents a string key.UInt8(u8): Represents an 8-bit unsigned integer key.UInt16(u16): Represents a 16-bit unsigned integer key.UInt32(u32): Represents a 32-bit unsigned integer key.UInt64(u64): Represents a 64-bit unsigned integer key.Usize(usize): Represents ausizekey.
Variants§
Boolean(bool)
Int16(i16)
Int32(i32)
Int64(i64)
Int8(i8)
String(String)
UInt16(u16)
UInt32(u32)
UInt64(u64)
UInt8(u8)
Usize(usize)
Trait Implementations§
Source§impl Clone for AttributeKey
impl Clone for AttributeKey
Source§fn clone(&self) -> AttributeKey
fn clone(&self) -> AttributeKey
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 AttributeKey
impl Debug for AttributeKey
Source§impl Display for AttributeKey
impl Display for AttributeKey
impl Eq for AttributeKey
Source§impl From<&str> for AttributeKey
impl From<&str> for AttributeKey
Source§impl From<String> for AttributeKey
impl From<String> for AttributeKey
Source§impl From<bool> for AttributeKey
impl From<bool> for AttributeKey
Source§impl From<i8> for AttributeKey
impl From<i8> for AttributeKey
Source§impl From<i16> for AttributeKey
impl From<i16> for AttributeKey
Source§impl From<i32> for AttributeKey
impl From<i32> for AttributeKey
Source§impl From<i64> for AttributeKey
impl From<i64> for AttributeKey
Source§impl From<u8> for AttributeKey
impl From<u8> for AttributeKey
Source§impl From<u16> for AttributeKey
impl From<u16> for AttributeKey
Source§impl From<u32> for AttributeKey
impl From<u32> for AttributeKey
Source§impl From<u64> for AttributeKey
impl From<u64> for AttributeKey
Source§impl From<usize> for AttributeKey
impl From<usize> for AttributeKey
impl FromMarker<&str> for AttributeKey
impl FromMarker<AttributeKey> for NodeIndex
impl FromMarker<String> for AttributeKey
impl FromMarker<bool> for AttributeKey
impl FromMarker<i8> for AttributeKey
impl FromMarker<i16> for AttributeKey
impl FromMarker<i32> for AttributeKey
impl FromMarker<i64> for AttributeKey
impl FromMarker<u8> for AttributeKey
impl FromMarker<u16> for AttributeKey
impl FromMarker<u32> for AttributeKey
impl FromMarker<u64> for AttributeKey
impl FromMarker<usize> for AttributeKey
Source§impl Hash for AttributeKey
impl Hash for AttributeKey
Source§impl Ord for AttributeKey
impl Ord for AttributeKey
Source§fn cmp(&self, other: &AttributeKey) -> Ordering
fn cmp(&self, other: &AttributeKey) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AttributeKey
impl PartialEq for AttributeKey
Source§fn eq(&self, other: &AttributeKey) -> bool
fn eq(&self, other: &AttributeKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AttributeKey
impl PartialOrd for AttributeKey
impl StructuralPartialEq for AttributeKey
Source§impl TryFrom<AnyValue<'_>> for AttributeKey
Available on crate feature polars only.
impl TryFrom<AnyValue<'_>> for AttributeKey
Available on crate feature
polars only.Source§type Error = GraphsterError
type Error = GraphsterError
The type returned in the event of a conversion error.
Source§fn try_from(value: AnyValue<'_>) -> GraphsterResult<Self>
fn try_from(value: AnyValue<'_>) -> GraphsterResult<Self>
Performs the conversion.
Source§impl TryFrom<AttributeValue> for AttributeKey
impl TryFrom<AttributeValue> for AttributeKey
Source§type Error = GraphsterError
type Error = GraphsterError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for AttributeKey
impl RefUnwindSafe for AttributeKey
impl Send for AttributeKey
impl Sync for AttributeKey
impl Unpin for AttributeKey
impl UnsafeUnpin for AttributeKey
impl UnwindSafe for AttributeKey
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more