[][src]Struct qualia::Checkpoint

pub struct Checkpoint<'a> { /* fields omitted */ }

A set of not-yet-committed changes to a Store, as created by Store::checkpoint().

Implementations

impl<'a> Checkpoint<'a>[src]

pub fn commit(self, description: impl AsRef<str>) -> Result<()>[src]

Commit this transaction with the given description.

pub fn add(&self, object: Object) -> Result<i64>[src]

Add an object to the store.

Returns the ID of the newly created object.

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

Get a MutableCollection of the objects matching the given query.

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

Methods from Deref<Target = Store>

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.

Trait Implementations

impl<'a> Deref for Checkpoint<'a>[src]

type Target = Store

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Checkpoint<'a>[src]

impl<'a> !Send for Checkpoint<'a>[src]

impl<'a> !Sync for Checkpoint<'a>[src]

impl<'a> Unpin for Checkpoint<'a>[src]

impl<'a> !UnwindSafe for Checkpoint<'a>[src]

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.