[][src]Struct ejdb::meta::CollectionMetadata

pub struct CollectionMetadata<'a>(_);

Represents metainformation about a collection in an EJDB database.

This structure only provides a view into the original BSON document, therefore it has a lifetime dependency on the database metadata structure. It is also not possible to unwrap the inner document, though it still has a Deref implementation with bson::Document as a target.

Methods

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

pub fn name(&self) -> &str[src]

Returns the name of this collection.

pub fn file(&self) -> &str[src]

Returns the file path of this collection.

pub fn records(&self) -> u64[src]

Returns the number of records in this collection.

pub fn buckets(&self) -> u64[src]

Returns the number of buckets in this collection.

pub fn cached_records(&self) -> u64[src]

Returns the number of cached records for this collection.

pub fn large(&self) -> bool[src]

Returns true if the collection can hold more than 2GB of data, false otherwise.

pub fn compressed(&self) -> bool[src]

Returns true if DEFLATE compression is applied to this collection's records, false otherwise.

pub fn indices(&self) -> CollectionIndices[src]

Returns an iterator of metadata of indices in this collection.

Trait Implementations

impl<'a> PartialEq<CollectionMetadata<'a>> for CollectionMetadata<'a>[src]

impl<'a> Clone for CollectionMetadata<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for CollectionMetadata<'a>[src]

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

type Target = Document

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a> Send for CollectionMetadata<'a>

impl<'a> Sync for CollectionMetadata<'a>

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Err = <U as TryFrom<T>>::Err