pub struct Unique {
pub value: String,
}
Fields
value: String
Implementations
Trait Implementations
The Id
of this collection.
Defines all View
s in this collection in schema
.
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Unique, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Unique, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type ByNameView = UniqueValue
type ByNameView = UniqueValue
The name view defined for the collection.
fn load<'name, 'life0, 'async_trait, N, C>(
id: N,
connection: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Option<CollectionDocument<Self>>, Error>> + Send + 'async_trait, Global>> where
'name: 'async_trait,
'life0: 'async_trait,
N: Into<NamedReference<'name>> + Send + Sync + 'async_trait,
C: Connection + 'async_trait,
Self: 'static + SerializedCollection + 'async_trait + Send,
fn load<'name, 'life0, 'async_trait, N, C>(
id: N,
connection: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Option<CollectionDocument<Self>>, Error>> + Send + 'async_trait, Global>> where
'name: 'async_trait,
'life0: 'async_trait,
N: Into<NamedReference<'name>> + Send + Sync + 'async_trait,
C: Connection + 'async_trait,
Self: 'static + SerializedCollection + 'async_trait + Send,
Gets a CollectionDocument
with id
from connection
.
fn entry<'name, N, C>(
id: N,
connection: &'connection C
) -> Entry<'connection, 'name, C, Self, (), ()>ⓘNotable traits for Entry<'a, 'name, Conn, Col, EI, EU>impl<'a, 'name, Conn, Col, EI, EU> Future for Entry<'a, 'name, Conn, Col, EI, EU> where
'name: 'a,
Col: 'static + NamedCollection + SerializedCollection,
Conn: Connection,
EI: 'a + EntryInsert<Col>,
EU: 'a + EntryUpdate<Col>, type Output = Result<Option<CollectionDocument<Col>>, Error>;
where
N: Into<NamedReference<'name>> + Send + Sync,
C: Connection,
Self: SerializedCollection,
fn entry<'name, N, C>(
id: N,
connection: &'connection C
) -> Entry<'connection, 'name, C, Self, (), ()>ⓘNotable traits for Entry<'a, 'name, Conn, Col, EI, EU>impl<'a, 'name, Conn, Col, EI, EU> Future for Entry<'a, 'name, Conn, Col, EI, EU> where
'name: 'a,
Col: 'static + NamedCollection + SerializedCollection,
Conn: Connection,
EI: 'a + EntryInsert<Col>,
EU: 'a + EntryUpdate<Col>, type Output = Result<Option<CollectionDocument<Col>>, Error>;
where
N: Into<NamedReference<'name>> + Send + Sync,
C: Connection,
Self: SerializedCollection,
impl<'a, 'name, Conn, Col, EI, EU> Future for Entry<'a, 'name, Conn, Col, EI, EU> where
'name: 'a,
Col: 'static + NamedCollection + SerializedCollection,
Conn: Connection,
EI: 'a + EntryInsert<Col>,
EU: 'a + EntryUpdate<Col>, type Output = Result<Option<CollectionDocument<Col>>, Error>;
Gets a CollectionDocument
with id
from connection
.
fn load_document<'name, 'life0, 'async_trait, N, C>(
name: N,
connection: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Option<OwnedDocument>, Error>> + Send + 'async_trait, Global>> where
'name: 'async_trait,
'life0: 'async_trait,
N: Into<NamedReference<'name>> + Send + Sync + 'async_trait,
C: Connection + 'async_trait,
Self: SerializedCollection + 'async_trait + Send,
fn load_document<'name, 'life0, 'async_trait, N, C>(
name: N,
connection: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Option<OwnedDocument>, Error>> + Send + 'async_trait, Global>> where
'name: 'async_trait,
'life0: 'async_trait,
N: Into<NamedReference<'name>> + Send + Sync + 'async_trait,
C: Connection + 'async_trait,
Self: SerializedCollection + 'async_trait + Send,
Loads a document from this collection by name, if applicable. Return
Ok(None)
if unsupported. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub 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
Auto Trait Implementations
impl RefUnwindSafe for Unique
impl UnwindSafe for Unique
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns the unique SchemaName
for this schema.
Defines the Collection
s into schema
.
impl<T> SerializedCollection for T where
T: DefaultSerialization + Serialize + DeserializeOwned,
impl<T> SerializedCollection for T where
T: DefaultSerialization + Serialize + DeserializeOwned,
type Contents = T
type Contents = T
The type of the contents stored in documents in this collection.
Returns the configured instance of Self::Format
.
Deserialize data
as Self::Contents
using this collection’s format.
Serialize item
using this collection’s format.
Gets a CollectionDocument
with id
from connection
.
fn get_multiple<'life0, 'life1, 'async_trait, C>(
ids: &'life0 [u64],
connection: &'life1 C
) -> Pin<Box<dyn Future<Output = Result<Vec<CollectionDocument<Self>, Global>, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
C: Connection + 'async_trait,
Self: 'async_trait + Send,
fn get_multiple<'life0, 'life1, 'async_trait, C>(
ids: &'life0 [u64],
connection: &'life1 C
) -> Pin<Box<dyn Future<Output = Result<Vec<CollectionDocument<Self>, Global>, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
C: Connection + 'async_trait,
Self: 'async_trait + Send,
Retrieves all documents matching ids
. Documents that are not found
are not returned, but no error will be generated. Read more
fn list<R, C>(ids: R, connection: &C) -> List<'_, C, Self>ⓘNotable traits for List<'a, Cn, Cl>impl<'a, Cn, Cl> Future for List<'a, Cn, Cl> where
Cl: SerializedCollection + Unpin,
Cn: Connection, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
where
R: Into<Range<u64>>,
C: Connection,
fn list<R, C>(ids: R, connection: &C) -> List<'_, C, Self>ⓘNotable traits for List<'a, Cn, Cl>impl<'a, Cn, Cl> Future for List<'a, Cn, Cl> where
Cl: SerializedCollection + Unpin,
Cn: Connection, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
where
R: Into<Range<u64>>,
C: Connection,
impl<'a, Cn, Cl> Future for List<'a, Cn, Cl> where
Cl: SerializedCollection + Unpin,
Cn: Connection, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
Retrieves all documents matching ids
. Documents that are not found
are not returned, but no error will be generated. Read more
fn push<'life0, 'async_trait, Cn>(
contents: Self::Contents,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self::Contents>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Cn: Connection + 'async_trait,
Self: 'static + 'async_trait + Send,
Self::Contents: 'async_trait,
fn push<'life0, 'async_trait, Cn>(
contents: Self::Contents,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self::Contents>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Cn: Connection + 'async_trait,
Self: 'static + 'async_trait + Send,
Self::Contents: 'async_trait,
Pushes this value into the collection, returning the created document.
fn push_into<'life0, 'async_trait, Cn>(
self,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Cn: Connection + 'async_trait,
Self: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
fn push_into<'life0, 'async_trait, Cn>(
self,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Cn: Connection + 'async_trait,
Self: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
Pushes this value into the collection, returning the created document.
fn insert<'life0, 'async_trait, Cn>(
id: u64,
contents: Self::Contents,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self::Contents>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Cn: Connection + 'async_trait,
Self: 'static + 'async_trait + Send,
Self::Contents: 'async_trait,
fn insert<'life0, 'async_trait, Cn>(
id: u64,
contents: Self::Contents,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self::Contents>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Cn: Connection + 'async_trait,
Self: 'static + 'async_trait + Send,
Self::Contents: 'async_trait,
Inserts this value into the collection with the specified id, returning the created document. Read more
fn insert_into<'life0, 'async_trait, Cn>(
self,
id: u64,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Cn: Connection + 'async_trait,
Self: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
fn insert_into<'life0, 'async_trait, Cn>(
self,
id: u64,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
Cn: Connection + 'async_trait,
Self: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
Inserts this value into the collection with the given id
, returning
the created document. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more