[][src]Struct qualia::Store

pub struct Store { /* fields omitted */ }

A set of objects stored on disk.

Implementations

impl Store[src]

pub fn open(path: impl AsRef<Path>) -> Result<Store>[src]

Open a store at the given path.

pub fn all(&self) -> Collection<'_>[src]

Get a Collection of all objects.

pub fn query(&self, query: impl Into<QueryNode>) -> Collection<'_>[src]

Get a Collection of the objects matching the given query.

This can take either a QueryNode or QueryBuilder; you almost certainly want to use the latter.

pub fn checkpoint(&mut self) -> Result<Checkpoint<'_>>[src]

Start a Checkpoint on the store. All modifications must be done through a checkpoint.

This method takes a mutable reference to ensure that only one checkpoint can be active at a given time.

pub fn undo(&mut self) -> Result<Option<String>>[src]

Undo all changes in the last checkpoint.

Returns the description of the undone checkpoint, if any. If no checkpoints exists, returns None.

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, 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.