Struct bonsaidb::core::schema::SchemaSummary
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§
§impl SchemaSummary
impl SchemaSummary
pub 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.
pub 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§
§impl Clone for SchemaSummary
impl Clone for SchemaSummary
§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 more§impl Debug for SchemaSummary
impl Debug for SchemaSummary
§impl<'de> Deserialize<'de> for SchemaSummary
impl<'de> Deserialize<'de> for SchemaSummary
§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
§impl<'a> From<&'a Schematic> for SchemaSummary
impl<'a> From<&'a Schematic> for SchemaSummary
§fn from(schematic: &'a Schematic) -> SchemaSummary
fn from(schematic: &'a Schematic) -> SchemaSummary
Converts to this type from the input type.
§impl PartialEq<SchemaSummary> for SchemaSummary
impl PartialEq<SchemaSummary> for SchemaSummary
§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 ==
.§impl Serialize for SchemaSummary
impl Serialize for SchemaSummary
§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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.