Fields§
§label: String
§authentication_token_id: u64
§project_id: u32
Implementations§
source§impl ApiToken
impl ApiToken
pub async fn create<C: AsyncConnection>(
label: String,
project_id: u32,
connection: &C,
admin: &C
) -> Result<(CollectionDocument<Self>, CollectionDocument<AuthenticationToken>)>
pub async fn delete<C: AsyncConnection>(
api_token: &CollectionDocument<Self>,
connection: &C,
admin: &C
) -> Result<()>
Trait Implementations§
source§impl Collection for ApiToken
impl Collection for ApiToken
§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§fn define_views(schema: &mut Schematic) -> Result<(), Error>
fn define_views(schema: &mut Schematic) -> Result<(), Error>
Defines all
View
s in this collection in schema
.§fn encryption_key() -> Option<KeyId>
fn encryption_key() -> Option<KeyId>
If a [
KeyId
] is returned, this collection will be stored encrypted
at-rest using the key specified.source§impl DefaultSerialization for ApiToken
impl DefaultSerialization for ApiToken
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 ApiToken
impl<'de> Deserialize<'de> for ApiToken
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
Auto Trait Implementations§
impl RefUnwindSafe for ApiToken
impl Send for ApiToken
impl Sync for ApiToken
impl Unpin for ApiToken
impl UnwindSafe for ApiToken
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>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Schema for Twhere
T: Collection + 'static,
impl<T> Schema for Twhere
T: Collection + 'static,
§fn schema_name() -> SchemaName
fn schema_name() -> SchemaName
Returns the unique [
SchemaName
] for this schema.§fn define_collections(schema: &mut Schematic) -> Result<(), Error>
fn define_collections(schema: &mut Schematic) -> Result<(), Error>
Defines the
Collection
s into schema
.§impl<T> SerializedCollection for Twhere
T: DefaultSerialization + Serialize + DeserializeOwned,
impl<T> SerializedCollection for Twhere
T: DefaultSerialization + Serialize + DeserializeOwned,
§fn format() -> <T as SerializedCollection>::Format
fn format() -> <T as SerializedCollection>::Format
Returns the configured instance of [
Self::Format
].§fn natural_id(
contents: &<T as SerializedCollection>::Contents
) -> Option<<T as Collection>::PrimaryKey>
fn natural_id(
contents: &<T as SerializedCollection>::Contents
) -> Option<<T as Collection>::PrimaryKey>
Returns the natural identifier of
contents
. This is called when
pushing values into a collection, before attempting to automatically
assign a unique id.§fn deserialize(data: &[u8]) -> Result<Self::Contents, Error>
fn deserialize(data: &[u8]) -> Result<Self::Contents, Error>
Deserialize
data
as Self::Contents
using this collection’s format.§fn document_contents<D>(doc: &D) -> Result<Self::Contents, Error>where
D: Document<Self>,
Self: Sized,
fn document_contents<D>(doc: &D) -> Result<Self::Contents, Error>where
D: Document<Self>,
Self: Sized,
Returns the deserialized contents of
doc
.§fn set_document_contents<D>(
doc: &mut D,
contents: Self::Contents
) -> Result<(), Error>where
D: Document<Self>,
Self: Sized,
fn set_document_contents<D>(
doc: &mut D,
contents: Self::Contents
) -> Result<(), Error>where
D: Document<Self>,
Self: Sized,
Sets the contents of
doc
to contents
.§fn serialize(item: &Self::Contents) -> Result<Vec<u8, Global>, Error>
fn serialize(item: &Self::Contents) -> Result<Vec<u8, Global>, Error>
Serialize
item
using this collection’s format.§fn get<C, PrimaryKey>(
id: &PrimaryKey,
connection: &C
) -> Result<Option<CollectionDocument<Self>>, Error>where
C: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Self: Sized,
fn get<C, PrimaryKey>(
id: &PrimaryKey,
connection: &C
) -> Result<Option<CollectionDocument<Self>>, Error>where
C: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Self: Sized,
§fn get_async<'life0, 'life1, 'async_trait, C, PrimaryKey>(
id: &'life0 PrimaryKey,
connection: &'life1 C
) -> Pin<Box<dyn Future<Output = Result<Option<CollectionDocument<Self>>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: AsyncConnection + 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: Sized + Send + 'async_trait,
fn get_async<'life0, 'life1, 'async_trait, C, PrimaryKey>(
id: &'life0 PrimaryKey,
connection: &'life1 C
) -> Pin<Box<dyn Future<Output = Result<Option<CollectionDocument<Self>>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
C: AsyncConnection + 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: Sized + Send + 'async_trait,
§fn get_multiple<'id, C, DocumentIds, PrimaryKey, I>(
ids: DocumentIds,
connection: &C
) -> Result<Vec<CollectionDocument<Self>, Global>, Error>where
C: Connection,
DocumentIds: IntoIterator<Item = &'id PrimaryKey, IntoIter = I> + Send + Sync,
I: Iterator<Item = &'id PrimaryKey> + Send + Sync,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'id,
Self: Sized,
fn get_multiple<'id, C, DocumentIds, PrimaryKey, I>(
ids: DocumentIds,
connection: &C
) -> Result<Vec<CollectionDocument<Self>, Global>, Error>where
C: Connection,
DocumentIds: IntoIterator<Item = &'id PrimaryKey, IntoIter = I> + Send + Sync,
I: Iterator<Item = &'id PrimaryKey> + Send + Sync,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'id,
Self: Sized,
Retrieves all documents matching
ids
. Documents that are not found
are not returned, but no error will be generated. Read more§fn get_multiple_async<'id, 'life0, 'async_trait, C, DocumentIds, PrimaryKey, I>(
ids: DocumentIds,
connection: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<CollectionDocument<Self>, Global>, Error>> + Send + 'async_trait, Global>>where
'id: 'async_trait,
'life0: 'async_trait,
C: AsyncConnection + 'async_trait,
DocumentIds: IntoIterator<Item = &'id PrimaryKey, IntoIter = I> + Send + Sync + 'async_trait,
I: Iterator<Item = &'id PrimaryKey> + Send + Sync + 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'id + 'async_trait,
Self: Sized + Send + 'async_trait,
fn get_multiple_async<'id, 'life0, 'async_trait, C, DocumentIds, PrimaryKey, I>(
ids: DocumentIds,
connection: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Vec<CollectionDocument<Self>, Global>, Error>> + Send + 'async_trait, Global>>where
'id: 'async_trait,
'life0: 'async_trait,
C: AsyncConnection + 'async_trait,
DocumentIds: IntoIterator<Item = &'id PrimaryKey, IntoIter = I> + Send + Sync + 'async_trait,
I: Iterator<Item = &'id PrimaryKey> + Send + Sync + 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'id + 'async_trait,
Self: Sized + Send + 'async_trait,
Retrieves all documents matching
ids
. Documents that are not found
are not returned, but no error will be generated. Read more§fn list<'id, R, PrimaryKey, C>(
ids: R,
connection: &'id C
) -> List<'id, C, Self, PrimaryKey>where
R: Into<RangeRef<'id, Self::PrimaryKey, PrimaryKey>>,
C: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + PartialEq<PrimaryKey> + 'id,
Self::PrimaryKey: Borrow<PrimaryKey> + PartialEq<PrimaryKey>,
Self: Sized,
fn list<'id, R, PrimaryKey, C>(
ids: R,
connection: &'id C
) -> List<'id, C, Self, PrimaryKey>where
R: Into<RangeRef<'id, Self::PrimaryKey, PrimaryKey>>,
C: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + PartialEq<PrimaryKey> + 'id,
Self::PrimaryKey: Borrow<PrimaryKey> + PartialEq<PrimaryKey>,
Self: Sized,
Retrieves all documents matching the range of
ids
. Read more§fn list_async<'id, R, PrimaryKey, C>(
ids: R,
connection: &'id C
) -> AsyncList<'id, C, Self, PrimaryKey>where
R: Into<RangeRef<'id, Self::PrimaryKey, PrimaryKey>>,
C: AsyncConnection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + PartialEq<PrimaryKey> + 'id + ?Sized,
Self::PrimaryKey: Borrow<PrimaryKey> + PartialEq<PrimaryKey>,
Self: Sized,
fn list_async<'id, R, PrimaryKey, C>(
ids: R,
connection: &'id C
) -> AsyncList<'id, C, Self, PrimaryKey>where
R: Into<RangeRef<'id, Self::PrimaryKey, PrimaryKey>>,
C: AsyncConnection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + PartialEq<PrimaryKey> + 'id + ?Sized,
Self::PrimaryKey: Borrow<PrimaryKey> + PartialEq<PrimaryKey>,
Self: Sized,
Retrieves all documents matching the range of
ids
. Read more§fn list_with_prefix<'a, PrimaryKey, C>(
prefix: &'a PrimaryKey,
connection: &'a C
) -> List<'a, C, Self, PrimaryKey>where
C: Connection,
Self: Sized,
PrimaryKey: IntoPrefixRange<'a, Self::PrimaryKey> + for<'k> KeyEncoding<'k, Self::PrimaryKey> + PartialEq<PrimaryKey> + ?Sized,
Self::PrimaryKey: Borrow<PrimaryKey> + PartialEq<PrimaryKey>,
fn list_with_prefix<'a, PrimaryKey, C>(
prefix: &'a PrimaryKey,
connection: &'a C
) -> List<'a, C, Self, PrimaryKey>where
C: Connection,
Self: Sized,
PrimaryKey: IntoPrefixRange<'a, Self::PrimaryKey> + for<'k> KeyEncoding<'k, Self::PrimaryKey> + PartialEq<PrimaryKey> + ?Sized,
Self::PrimaryKey: Borrow<PrimaryKey> + PartialEq<PrimaryKey>,
Retrieves all documents with ids that start with
prefix
. Read more§fn list_with_prefix_async<'a, PrimaryKey, C>(
prefix: &'a PrimaryKey,
connection: &'a C
) -> AsyncList<'a, C, Self, PrimaryKey>where
C: AsyncConnection,
Self: Sized,
PrimaryKey: IntoPrefixRange<'a, Self::PrimaryKey> + for<'k> KeyEncoding<'k, Self::PrimaryKey> + PartialEq<PrimaryKey> + ?Sized,
Self::PrimaryKey: Borrow<PrimaryKey> + PartialEq<PrimaryKey>,
fn list_with_prefix_async<'a, PrimaryKey, C>(
prefix: &'a PrimaryKey,
connection: &'a C
) -> AsyncList<'a, C, Self, PrimaryKey>where
C: AsyncConnection,
Self: Sized,
PrimaryKey: IntoPrefixRange<'a, Self::PrimaryKey> + for<'k> KeyEncoding<'k, Self::PrimaryKey> + PartialEq<PrimaryKey> + ?Sized,
Self::PrimaryKey: Borrow<PrimaryKey> + PartialEq<PrimaryKey>,
Retrieves all documents with ids that start with
prefix
. Read more§fn all<C>(connection: &C) -> List<'_, C, Self, Self::PrimaryKey>where
C: Connection,
Self: Sized,
fn all<C>(connection: &C) -> List<'_, C, Self, Self::PrimaryKey>where
C: Connection,
Self: Sized,
Retrieves all documents. Read more
§fn all_async<C>(connection: &C) -> AsyncList<'_, C, Self, Self::PrimaryKey>where
C: AsyncConnection,
Self: Sized,
fn all_async<C>(connection: &C) -> AsyncList<'_, C, Self, Self::PrimaryKey>where
C: AsyncConnection,
Self: Sized,
Retrieves all documents. Read more
§fn push<Cn>(
contents: Self::Contents,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self::Contents>>where
Cn: Connection,
Self: Sized + 'static,
fn push<Cn>(
contents: Self::Contents,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self::Contents>>where
Cn: Connection,
Self: Sized + 'static,
Pushes this value into the collection, returning the created document.
This function is useful when
Self != Self::Contents
. Read more§fn push_async<'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,
Self: Sized + 'static + Send + 'async_trait,
Self::Contents: 'async_trait,
Cn: 'async_trait + AsyncConnection,
fn push_async<'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,
Self: Sized + 'static + Send + 'async_trait,
Self::Contents: 'async_trait,
Cn: 'async_trait + AsyncConnection,
Pushes this value into the collection, returning the created document.
This function is useful when
Self != Self::Contents
. Read more§fn push_all<Contents, Cn>(
contents: Contents,
connection: &Cn
) -> Result<Vec<CollectionDocument<Self>, Global>, Error>where
Contents: IntoIterator<Item = Self::Contents>,
Cn: Connection,
Self: Sized + 'static,
Self::PrimaryKey: Default,
fn push_all<Contents, Cn>(
contents: Contents,
connection: &Cn
) -> Result<Vec<CollectionDocument<Self>, Global>, Error>where
Contents: IntoIterator<Item = Self::Contents>,
Cn: Connection,
Self: Sized + 'static,
Self::PrimaryKey: Default,
Pushes all
contents
in a single transaction. If successful, all
collection documents will be returned. If an error occurs during this
operation, no documents will be pushed. Read more§fn push_all_async<'life0, 'async_trait, Contents, Cn>(
contents: Contents,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<Vec<CollectionDocument<Self>, Global>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: Sized + 'static + Send + 'async_trait,
Self::PrimaryKey: Default,
<Contents as IntoIterator>::IntoIter: Send,
Contents: 'async_trait + IntoIterator<Item = Self::Contents> + Send,
Cn: 'async_trait + AsyncConnection,
fn push_all_async<'life0, 'async_trait, Contents, Cn>(
contents: Contents,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<Vec<CollectionDocument<Self>, Global>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: Sized + 'static + Send + 'async_trait,
Self::PrimaryKey: Default,
<Contents as IntoIterator>::IntoIter: Send,
Contents: 'async_trait + IntoIterator<Item = Self::Contents> + Send,
Cn: 'async_trait + AsyncConnection,
Pushes all
contents
in a single transaction. If successful, all
collection documents will be returned. If an error occurs during this
operation, no documents will be pushed. Read more§fn push_into<Cn>(
self,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>>where
Cn: Connection,
Self: SerializedCollection<Contents = Self> + Sized + 'static,
fn push_into<Cn>(
self,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>>where
Cn: Connection,
Self: SerializedCollection<Contents = Self> + Sized + 'static,
Pushes this value into the collection, returning the created document. Read more
§fn push_into_async<'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,
Self: SerializedCollection<Contents = Self> + Sized + 'static + Send + 'async_trait,
Cn: 'async_trait + AsyncConnection,
fn push_into_async<'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,
Self: SerializedCollection<Contents = Self> + Sized + 'static + Send + 'async_trait,
Cn: 'async_trait + AsyncConnection,
Pushes this value into the collection, returning the created document. Read more
§fn insert<PrimaryKey, Cn>(
id: &PrimaryKey,
contents: Self::Contents,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self::Contents>>where
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Cn: Connection,
Self: Sized + 'static,
fn insert<PrimaryKey, Cn>(
id: &PrimaryKey,
contents: Self::Contents,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self::Contents>>where
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Cn: Connection,
Self: Sized + 'static,
Inserts this value into the collection with the specified id, returning
the created document. Read more
§fn insert_async<'life0, 'life1, 'async_trait, PrimaryKey, Cn>(
id: &'life0 PrimaryKey,
contents: Self::Contents,
connection: &'life1 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self::Contents>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: Sized + 'static + Send + 'async_trait,
Self::Contents: 'async_trait,
fn insert_async<'life0, 'life1, 'async_trait, PrimaryKey, Cn>(
id: &'life0 PrimaryKey,
contents: Self::Contents,
connection: &'life1 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self::Contents>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: Sized + 'static + Send + 'async_trait,
Self::Contents: 'async_trait,
Inserts this value into the collection with the specified id, returning
the created document. Read more
§fn insert_into<PrimaryKey, Cn>(
self,
id: &PrimaryKey,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>>where
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Cn: Connection,
Self: SerializedCollection<Contents = Self> + Sized + 'static,
fn insert_into<PrimaryKey, Cn>(
self,
id: &PrimaryKey,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>>where
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Cn: Connection,
Self: SerializedCollection<Contents = Self> + Sized + 'static,
Inserts this value into the collection with the given
id
, returning
the created document. Read more§fn insert_into_async<'life0, 'life1, 'async_trait, PrimaryKey, Cn>(
self,
id: &'life0 PrimaryKey,
connection: &'life1 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: SerializedCollection<Contents = Self> + Sized + 'static + Send + 'async_trait,
fn insert_into_async<'life0, 'life1, 'async_trait, PrimaryKey, Cn>(
self,
id: &'life0 PrimaryKey,
connection: &'life1 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: SerializedCollection<Contents = Self> + Sized + 'static + Send + 'async_trait,
Inserts this value into the collection with the given
id
, returning
the created document. Read more§fn overwrite<PrimaryKey, Cn>(
id: &PrimaryKey,
contents: Self::Contents,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self::Contents>>where
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Cn: Connection,
Self: Sized + 'static,
fn overwrite<PrimaryKey, Cn>(
id: &PrimaryKey,
contents: Self::Contents,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self::Contents>>where
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Cn: Connection,
Self: Sized + 'static,
Overwrites this value into the collection with the specified id, returning
the created or updated document. Read more
§fn overwrite_async<'life0, 'life1, 'async_trait, PrimaryKey, Cn>(
id: &'life0 PrimaryKey,
contents: Self::Contents,
connection: &'life1 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self::Contents>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: Sized + 'static + Send + 'async_trait,
Self::Contents: 'async_trait,
fn overwrite_async<'life0, 'life1, 'async_trait, PrimaryKey, Cn>(
id: &'life0 PrimaryKey,
contents: Self::Contents,
connection: &'life1 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self::Contents>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: Sized + 'static + Send + 'async_trait,
Self::Contents: 'async_trait,
Overwrites this value into the collection with the specified id, returning
the created or updated document. Read more
§fn overwrite_into<Cn, PrimaryKey>(
self,
id: &PrimaryKey,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>>where
Cn: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Self: SerializedCollection<Contents = Self> + Sized + 'static,
fn overwrite_into<Cn, PrimaryKey>(
self,
id: &PrimaryKey,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>>where
Cn: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Self: SerializedCollection<Contents = Self> + Sized + 'static,
Overwrites this value into the collection with the given
id
, returning
the created or updated document. Read more§fn overwrite_into_async<'life0, 'life1, 'async_trait, Cn, PrimaryKey>(
self,
id: &'life0 PrimaryKey,
connection: &'life1 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: SerializedCollection<Contents = Self> + Sized + 'static + Send + 'async_trait,
Cn: 'async_trait + AsyncConnection,
fn overwrite_into_async<'life0, 'life1, 'async_trait, Cn, PrimaryKey>(
self,
id: &'life0 PrimaryKey,
connection: &'life1 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: SerializedCollection<Contents = Self> + Sized + 'static + Send + 'async_trait,
Cn: 'async_trait + AsyncConnection,
Overwrites this value into the collection with the given
id
, returning
the created or updated document. Read more