Struct bonsaidb_core::test_util::Basic
source · pub struct Basic {
pub value: String,
pub category: Option<String>,
pub parent_id: Option<u64>,
pub tags: Vec<String>,
}
Fields§
§value: String
§category: Option<String>
§parent_id: Option<u64>
Implementations§
Trait Implementations§
source§impl Collection for Basic
impl Collection for Basic
§type PrimaryKey = u64
type PrimaryKey = u64
The unique id type. Each document stored in a collection will be
uniquely identified by this type. Read more
source§fn collection_name() -> CollectionName
fn collection_name() -> CollectionName
The unique name of this collection. Each collection must be uniquely
named within the
Schema
it is registered
within.source§impl DefaultSerialization for Basic
impl DefaultSerialization for Basic
source§fn natural_id(&self) -> Option<Self::PrimaryKey>
fn natural_id(&self) -> Option<Self::PrimaryKey>
Returns the natural identifier of
contents
. This is called when
pushing values into a collection, before attempting to automatically
assign a unique id.source§impl<'de> Deserialize<'de> for Basic
impl<'de> Deserialize<'de> for Basic
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 PartialEq<Basic> for Basic
impl PartialEq<Basic> for Basic
impl Eq for Basic
impl StructuralEq for Basic
impl StructuralPartialEq for Basic
Auto Trait Implementations§
impl RefUnwindSafe for Basic
impl Send for Basic
impl Sync for Basic
impl Unpin for Basic
impl UnwindSafe for Basic
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Schema for Twhere
T: Collection + 'static,
impl<T> Schema for Twhere T: Collection + 'static,
source§fn schema_name() -> SchemaName
fn schema_name() -> SchemaName
Returns the unique
SchemaName
for this schema.