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<SchemaSummary, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<SchemaSummary, <__D as Deserializer<'de>>::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§fn from(schematic: &'a Schematic) -> SchemaSummary
fn from(schematic: &'a Schematic) -> SchemaSummary
Converts to this type from the input type.
source§impl PartialEq for SchemaSummary
impl PartialEq 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
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.