[][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.

Implementations

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]

impl Debug for Vertex[src]

impl Eq for Vertex[src]

impl Hash for Vertex[src]

impl PartialEq<Vertex> for Vertex[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,