Struct bonsaidb_core::schema::SchemaSummary
source · pub struct SchemaSummary {
pub name: SchemaName,
/* private fields */
}
Expand description
A summary of a Schema
/Schematic
.
This type is a serializable summary of a Schematic
and is the result of
StorageConnection::list_available_schemas
/AsyncStorageConnection::list_available_schemas
.
It can be used to query information stored in BonsaiDb without needing
access to the Rust types.
Fields§
§name: SchemaName
The name of the Schema
this summary is of.
Implementations§
source§impl SchemaSummary
impl SchemaSummary
sourcepub fn collection(&self, name: &CollectionName) -> Option<&CollectionSummary>
pub fn collection(&self, name: &CollectionName) -> Option<&CollectionSummary>
Returns the summary of named collection, if the schema contains it.
sourcepub fn collections(&self) -> impl Iterator<Item = &CollectionSummary>
pub fn collections(&self) -> impl Iterator<Item = &CollectionSummary>
Returns an iterator over all collections contained in this schema.
Trait Implementations§
source§impl Clone for SchemaSummary
impl Clone for SchemaSummary
source§fn clone(&self) -> SchemaSummary
fn clone(&self) -> SchemaSummary
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SchemaSummary
impl Debug for SchemaSummary
source§impl<'de> Deserialize<'de> for SchemaSummary
impl<'de> Deserialize<'de> for SchemaSummary
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a> From<&'a Schematic> for SchemaSummary
impl<'a> From<&'a Schematic> for SchemaSummary
source§impl PartialEq<SchemaSummary> for SchemaSummary
impl PartialEq<SchemaSummary> for SchemaSummary
source§fn eq(&self, other: &SchemaSummary) -> bool
fn eq(&self, other: &SchemaSummary) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SchemaSummary
impl Serialize for SchemaSummary
impl Eq for SchemaSummary
impl StructuralEq for SchemaSummary
impl StructuralPartialEq for SchemaSummary
Auto Trait Implementations§
impl RefUnwindSafe for SchemaSummary
impl Send for SchemaSummary
impl Sync for SchemaSummary
impl Unpin for SchemaSummary
impl UnwindSafe for SchemaSummary
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more