[][src]Struct ejdb::meta::DatabaseMetadata

pub struct DatabaseMetadata(_);

Represents metainformation about an EJDB database.

EJDB returns metadata in form of a BSON document, therefore this struct is just a wrapper around a BSON document value. Due to Deref implementation, it is possible to call bson::Document methods on this structure directly.

Note that EJDB metadata has fixed form, therefore every method which provides access to the parts of metadata will panic if it can't obtain this part or if the actual BSON value is of different type. If this happens, then it is a bug in this library.

Methods

impl DatabaseMetadata[src]

pub fn into_inner(self) -> Document[src]

Consumes the metadata object, returning the underlying BSON document.

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

Returns the file name of the main database file.

pub fn collections(&self) -> Collections[src]

Returns an iterator of metadata for each collection in the database.

Trait Implementations

impl PartialEq<DatabaseMetadata> for DatabaseMetadata[src]

impl Clone for DatabaseMetadata[src]

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

Performs copy-assignment from source. Read more

impl Debug for DatabaseMetadata[src]

impl Deref for DatabaseMetadata[src]

type Target = Document

The resulting type after dereferencing.

Auto Trait Implementations

impl Send for DatabaseMetadata

impl Sync for DatabaseMetadata

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