pub struct Vertex {
pub id: Uuid,
pub t: Identifier,
}
Expand description
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: Identifier
The type of the vertex.
Implementations§
Source§impl Vertex
impl Vertex
Sourcepub fn new(t: Identifier) -> Self
pub fn new(t: Identifier) -> Self
Creates a new vertex with an ID generated via UUIDv1. These vertex IDs are trivially guessable and consequently less secure, but index better. This method is suggested unless you need vertex IDs to not be trivially guessable.
§Arguments
t
: The type of the vertex.
Sourcepub fn with_id(id: Uuid, t: Identifier) -> Self
pub fn with_id(id: Uuid, t: Identifier) -> Self
Creates a new vertex with a specified id.
§Arguments
id
: The id of the vertex.t
: The type of the vertex.
Trait Implementations§
impl Eq for Vertex
Auto Trait Implementations§
impl Freeze for Vertex
impl RefUnwindSafe for Vertex
impl Send for Vertex
impl Sync for Vertex
impl Unpin for Vertex
impl UnwindSafe for Vertex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.