[][src]Struct qualia::MutableCollection

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

A reference to a modifiable set of objects matching a given query, as returned by Checkpoint::query().

All methods of Collection are available for MutableCollection.

Implementations

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

pub fn delete(&self) -> Result<usize>[src]

Delete all objects in the collection.

Returns the number of deleted objects.

Methods from Deref<Target = Collection<'a>>

pub fn len(&self) -> Result<usize>[src]

Get the number of objects in the collection.

pub fn exists(&self) -> Result<bool>[src]

Returns true if there are any objects in the collection.

pub fn iter(&self) -> Result<impl Iterator<Item = Object> + 'a>[src]

Iterate over all objects in the collection.

This prefetches all objects in the collection so that errors can be reported early.

pub fn iter_as<T: ObjectShape + 'a>(
    &self
) -> Result<impl Iterator<Item = T> + 'a>
[src]

Iterate over all objects in the collection, converting them to the given shape.

This prefetches all objects in the collection so that errors can be reported early.

Trait Implementations

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

type Target = Collection<'a>

The resulting type after dereferencing.

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.