pub struct List<'a, Cn, Cl, PrimaryKey>(_)
where
    Cl: Collection
;
Expand description

Retrieves a list of documents from a collection. This structure also offers functions to customize the options for the operation.

Implementations

Lists documents by id in ascending order.

Lists documents by id in descending order.

Sets the maximum number of results to return.

Returns the list of document headers contained within the range.

println!(
    "Headers with id 42 or larger: {:?}",
    MyCollection::list(42.., db).headers()?
);
println!(
    "Headers in MyCollection: {:?}",
    MyCollection::all(db).headers()?
);

Returns the number of documents contained within the range.

Order and limit are ignored if they were set.

println!(
    "Number of documents with id 42 or larger: {}",
    MyCollection::list(42.., db).count()?
);
println!(
    "Number of documents in MyCollection: {}",
    MyCollection::all(db).count()?
);

Retrieves the list of documents, using the configured options.

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.

Should always be Self

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.