[][src]Struct indradb::Vertex

pub struct Vertex {
    pub id: Uuid,
    pub t: Type,
}

A vertex.

Vertices are how you would represent nouns in the datastore. An example might be a user, or a movie. All vertices have a unique ID and a type.

Fields

id: Uuid

The id of the vertex.

t: Type

The type of the vertex.

Methods

impl Vertex[src]

pub fn new(t: Type) -> Self[src]

Creates a new vertex with an ID generated via UUIDv1. These vertex IDs are trivially guessable and consequently less secure, but likely index better depending on the datastore. This method is suggested unless you need vertex IDs to not be trivially guessable.

Arguments

  • t - The type of the vertex.

pub fn with_id(id: Uuid, t: Type) -> Self[src]

Creates a new vertex with a specified id.

Arguments

  • id - The id of the vertex.
  • t - The type of the vertex.

Trait Implementations

impl Clone for Vertex[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Vertex> for Vertex[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Eq for Vertex[src]

impl Debug for Vertex[src]

impl Hash for Vertex[src]

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

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Sync for Vertex

impl Send for Vertex

impl Unpin for Vertex

impl RefUnwindSafe for Vertex

impl UnwindSafe for Vertex

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]