[][src]Struct ejdb::meta::IndexMetadata

pub struct IndexMetadata<'a>(_);

Represents metainformation about an index of a collection in an EJDB database.

Like CollectionMetadata, this structure only provides a view into the full database metadata object, so it is not possible to obtain a bson::Document directly. Deref<Target=bson::Document> implementation is available.

Methods

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

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

Returns the name of the field on which this index is defined.

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

Returns the name of this index itself (usually it is automatically generated).

pub fn index_type(&self) -> IndexType[src]

Returns the type of this index.

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

Returns the number of records using this index, if available.

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

Returns the path to the file of this index, if available.

Trait Implementations

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

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

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

Performs copy-assignment from source. Read more

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

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

type Target = Document

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a> Send for IndexMetadata<'a>

impl<'a> Sync for IndexMetadata<'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