pub struct MemoryDatastore { /* private fields */ }
Expand description

An in-memory datastore.

Implementations§

👎Deprecated: use read_msgpack, as it supports properties

Reads a persisted image from disk. Calls to sync will overwrite the file at the specified path. For historic reasons, this uses bincode, however bincode cannot serialize properties. If your graph needs persistent properties, use read_msgpack.

Arguments
  • path: The path to the persisted image.

Reads a persisted image from disk. Calls to sync will overwrite the file at the specified path. Uses msgpack, which unlike bincode supports properties.

Arguments
  • path: The path to the persisted image.
👎Deprecated: use create_msgpack, as it supports properties

Creates a new datastore. Calls to sync will overwrite the file at the specified path, but as opposed to read, this will not read the file first. For historic reasons, this uses bincode, however bincode cannot serialize properties. If your graph needs persistent properties, use create_msgpack.

Arguments
  • path: The path to the persisted image.

Creates a new datastore. Calls to sync will overwrite the file at the specified path, but as opposed to read, this will not read the file first. Uses msgpack, which unlike bincode supports properties.

Arguments
  • path: The path to the persisted image.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Syncs persisted content. Depending on the datastore implementation, this has different meanings - including potentially being a no-op.
Creates a new vertex. Returns whether the vertex was successfully created - if this is false, it’s because a vertex with the same UUID already exists. Read more
Gets a range of vertices specified by a query. Read more
Deletes existing vertices specified by a query. Read more
Gets the number of vertices in the datastore.
Creates a new edge. If the edge already exists, this will update it with a new update datetime. Returns whether the edge was successfully created - if this is false, it’s because one of the specified vertices is missing. Read more
Gets a range of edges specified by a query. Read more
Deletes a set of edges specified by a query. Read more
Gets the number of edges associated with a vertex. Read more
Gets vertex properties. Read more
Gets all vertex properties. Read more
Sets a vertex properties. Read more
Deletes vertex properties. Read more
Gets edge properties. Read more
Gets all edge properties. Read more
Sets edge properties. Read more
Deletes edge properties. Read more
Creates a new transaction. Some datastore implementations do not support transactional updates, in which case this will return an error.
Creates a new vertex with just a type specification. As opposed to create_vertex, this is used when you do not want to manually specify the vertex’s UUID. Returns the new vertex’s UUID. Read more
Bulk inserts many vertices, edges, and/or properties. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.