[−][src]Struct ejdb::meta::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]
fn eq(&self, other: &DatabaseMetadata) -> bool
[src]
fn ne(&self, other: &DatabaseMetadata) -> bool
[src]
impl Clone for DatabaseMetadata
[src]
fn clone(&self) -> 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]
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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,