Skip to main content

AttributeKey

Enum AttributeKey 

Source
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 a usize key.

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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for AttributeKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AttributeKey

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for AttributeKey

Source§

impl From<&str> for AttributeKey

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<String> for AttributeKey

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for AttributeKey

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for AttributeKey

Source§

fn from(value: i8) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for AttributeKey

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for AttributeKey

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for AttributeKey

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for AttributeKey

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for AttributeKey

Source§

fn from(value: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for AttributeKey

Source§

fn from(value: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u64> for AttributeKey

Source§

fn from(value: u64) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for AttributeKey

Source§

fn from(value: usize) -> Self

Converts to this type from the input type.
Source§

impl FromMarker<&str> for AttributeKey

Source§

impl FromMarker<AttributeKey> for NodeIndex

Source§

impl FromMarker<String> for AttributeKey

Source§

impl FromMarker<bool> for AttributeKey

Source§

impl FromMarker<i8> for AttributeKey

Source§

impl FromMarker<i16> for AttributeKey

Source§

impl FromMarker<i32> for AttributeKey

Source§

impl FromMarker<i64> for AttributeKey

Source§

impl FromMarker<u8> for AttributeKey

Source§

impl FromMarker<u16> for AttributeKey

Source§

impl FromMarker<u32> for AttributeKey

Source§

impl FromMarker<u64> for AttributeKey

Source§

impl FromMarker<usize> for AttributeKey

Source§

impl Hash for AttributeKey

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for AttributeKey

Source§

fn cmp(&self, other: &AttributeKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for AttributeKey

Source§

fn eq(&self, other: &AttributeKey) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for AttributeKey

Source§

fn partial_cmp(&self, other: &AttributeKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for AttributeKey

Source§

impl TryFrom<AnyValue<'_>> for AttributeKey

Available on crate feature polars only.
Source§

type Error = GraphsterError

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

fn try_from(value: AnyValue<'_>) -> GraphsterResult<Self>

Performs the conversion.
Source§

impl TryFrom<AttributeValue> for AttributeKey

Source§

type Error = GraphsterError

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

fn try_from(value: AttributeValue) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> IntoMarker<U> for T
where U: FromMarker<T>,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.