Struct bonsaidb::core::admin::PermissionGroup [−][src]
Expand description
A named group of permissions statements.
Fields
name: String
The name of the group. Must be unique.
statements: Vec<Statement, Global>
The permission statements.
Implementations
Returns a new group with no statements and the name provided.
pub fn with_group_ids<I>(self, statements: I) -> PermissionGroup where
I: IntoIterator<Item = Statement>,
pub fn with_group_ids<I>(self, statements: I) -> PermissionGroup where
I: IntoIterator<Item = Statement>,
Builder-style method. Returns self after replacing the current statements with statements
.
Trait Implementations
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
Defines all View
s in this collection in schema
.
Returns the natural identifier of contents
. This is called when
pushing values into a collection, before attempting to automatically
assign a unique id. Read more
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<PermissionGroup, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<PermissionGroup, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type ByNameView = ByName
type ByNameView = ByName
The name view defined for the collection.
fn load<'name, N, C>(
id: N,
connection: &C
) -> Result<Option<CollectionDocument<Self>>, Error> where
N: Nameable<'name, Self::PrimaryKey> + Send + Sync,
C: Connection,
Self: 'static + SerializedCollection,
fn load<'name, N, C>(
id: N,
connection: &C
) -> Result<Option<CollectionDocument<Self>>, Error> where
N: Nameable<'name, Self::PrimaryKey> + Send + Sync,
C: Connection,
Self: 'static + SerializedCollection,
Gets a CollectionDocument
with id
from connection
.
fn load_async<'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,
Self: 'static + SerializedCollection + 'async_trait + Send,
N: 'async_trait + Nameable<'name, Self::PrimaryKey> + Send + Sync,
C: 'async_trait + AsyncConnection,
fn load_async<'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,
Self: 'static + SerializedCollection + 'async_trait + Send,
N: 'async_trait + Nameable<'name, Self::PrimaryKey> + Send + Sync,
C: 'async_trait + AsyncConnection,
Gets a CollectionDocument
with id
from connection
.
fn entry<'name, N, C>(
id: N,
connection: &'connection C
) -> Entry<'connection, 'name, C, Self, (), ()> where
N: Into<NamedReference<'name, Self::PrimaryKey>> + Send + Sync,
C: Connection,
Self: SerializedCollection,
fn entry<'name, N, C>(
id: N,
connection: &'connection C
) -> Entry<'connection, 'name, C, Self, (), ()> where
N: Into<NamedReference<'name, Self::PrimaryKey>> + Send + Sync,
C: Connection,
Self: SerializedCollection,
Gets a CollectionDocument
with id
from connection
.
fn entry_async<'name, N, C>(
id: N,
connection: &'connection C
) -> AsyncEntry<'connection, 'name, C, Self, (), ()>ⓘNotable traits for AsyncEntry<'a, 'name, Conn, Col, EI, EU>impl<'a, 'name, Conn, Col, EI, EU> Future for AsyncEntry<'a, 'name, Conn, Col, EI, EU> where
'name: 'a,
Col: 'static + NamedCollection + SerializedCollection,
Conn: AsyncConnection,
EI: 'a + EntryInsert<Col>,
EU: 'a + EntryUpdate<Col>,
<Col as Collection>::PrimaryKey: Unpin, type Output = Result<Option<CollectionDocument<Col>>, Error>;
where
N: Into<NamedReference<'name, Self::PrimaryKey>> + Send + Sync,
C: AsyncConnection,
Self: SerializedCollection,
fn entry_async<'name, N, C>(
id: N,
connection: &'connection C
) -> AsyncEntry<'connection, 'name, C, Self, (), ()>ⓘNotable traits for AsyncEntry<'a, 'name, Conn, Col, EI, EU>impl<'a, 'name, Conn, Col, EI, EU> Future for AsyncEntry<'a, 'name, Conn, Col, EI, EU> where
'name: 'a,
Col: 'static + NamedCollection + SerializedCollection,
Conn: AsyncConnection,
EI: 'a + EntryInsert<Col>,
EU: 'a + EntryUpdate<Col>,
<Col as Collection>::PrimaryKey: Unpin, type Output = Result<Option<CollectionDocument<Col>>, Error>;
where
N: Into<NamedReference<'name, Self::PrimaryKey>> + Send + Sync,
C: AsyncConnection,
Self: SerializedCollection,
impl<'a, 'name, Conn, Col, EI, EU> Future for AsyncEntry<'a, 'name, Conn, Col, EI, EU> where
'name: 'a,
Col: 'static + NamedCollection + SerializedCollection,
Conn: AsyncConnection,
EI: 'a + EntryInsert<Col>,
EU: 'a + EntryUpdate<Col>,
<Col as Collection>::PrimaryKey: Unpin, type Output = Result<Option<CollectionDocument<Col>>, Error>;
Gets a CollectionDocument
with id
from connection
.
fn load_document<'name, N, C>(
name: N,
connection: &C
) -> Result<Option<OwnedDocument>, Error> where
N: Nameable<'name, Self::PrimaryKey> + Send + Sync,
C: Connection,
Self: SerializedCollection,
fn load_document<'name, N, C>(
name: N,
connection: &C
) -> Result<Option<OwnedDocument>, Error> where
N: Nameable<'name, Self::PrimaryKey> + Send + Sync,
C: Connection,
Self: SerializedCollection,
Loads a document from this collection by name, if applicable. Return
Ok(None)
if unsupported. Read more
fn load_document_async<'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,
Self: SerializedCollection + 'async_trait + Send,
N: 'async_trait + Nameable<'name, Self::PrimaryKey> + Send + Sync,
C: 'async_trait + AsyncConnection,
fn load_document_async<'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,
Self: SerializedCollection + 'async_trait + Send,
N: 'async_trait + Nameable<'name, Self::PrimaryKey> + Send + Sync,
C: 'async_trait + AsyncConnection,
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 PermissionGroup
impl Send for PermissionGroup
impl Sync for PermissionGroup
impl Unpin for PermissionGroup
impl UnwindSafe for PermissionGroup
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
.
pub fn natural_id(
contents: &<T as SerializedCollection>::Contents
) -> Option<<T as Collection>::PrimaryKey>
pub 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. Read more
Deserialize data
as Self::Contents
using this collection’s format.
Returns the deserialized contents of doc
.
Sets the contents of doc
to contents
.
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>,
fn get<C, PrimaryKey>(
id: PrimaryKey,
connection: &C
) -> Result<Option<CollectionDocument<Self>>, Error> where
C: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Gets a CollectionDocument
with id
from connection
. Read more
fn get_async<'life0, 'async_trait, C, PrimaryKey>(
id: PrimaryKey,
connection: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Option<CollectionDocument<Self>>, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
C: AsyncConnection + 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: 'async_trait + Send,
fn get_async<'life0, 'async_trait, C, PrimaryKey>(
id: PrimaryKey,
connection: &'life0 C
) -> Pin<Box<dyn Future<Output = Result<Option<CollectionDocument<Self>>, Error>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
C: AsyncConnection + 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: 'async_trait + Send,
Gets a CollectionDocument
with id
from connection
. Read more
fn get_multiple<C, DocumentIds, PrimaryKey, I>(
ids: DocumentIds,
connection: &C
) -> Result<Vec<CollectionDocument<Self>, Global>, Error> where
C: Connection,
DocumentIds: IntoIterator<Item = PrimaryKey, IntoIter = I> + Send + Sync,
I: Iterator<Item = PrimaryKey> + Send + Sync,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
fn get_multiple<C, DocumentIds, PrimaryKey, I>(
ids: DocumentIds,
connection: &C
) -> Result<Vec<CollectionDocument<Self>, Global>, Error> where
C: Connection,
DocumentIds: IntoIterator<Item = PrimaryKey, IntoIter = I> + Send + Sync,
I: Iterator<Item = PrimaryKey> + Send + Sync,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
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<'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
'life0: 'async_trait,
C: AsyncConnection + 'async_trait,
DocumentIds: IntoIterator<Item = PrimaryKey, IntoIter = I> + Send + Sync + 'async_trait,
I: Iterator<Item = PrimaryKey> + Send + Sync + 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: 'async_trait + Send,
fn get_multiple_async<'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
'life0: 'async_trait,
C: AsyncConnection + 'async_trait,
DocumentIds: IntoIterator<Item = PrimaryKey, IntoIter = I> + Send + Sync + 'async_trait,
I: Iterator<Item = PrimaryKey> + Send + Sync + 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + '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, PrimaryKey, C>(
ids: R,
connection: &C
) -> List<'_, C, Self, PrimaryKey> where
R: Into<Range<PrimaryKey>>,
C: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
fn list<R, PrimaryKey, C>(
ids: R,
connection: &C
) -> List<'_, C, Self, PrimaryKey> where
R: Into<Range<PrimaryKey>>,
C: Connection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Retrieves all documents matching the range of ids
. Read more
fn list_async<R, PrimaryKey, C>(
ids: R,
connection: &C
) -> AsyncList<'_, C, Self, PrimaryKey>ⓘNotable traits for AsyncList<'a, Cn, Cl, PrimaryKey>impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
where
R: Into<Range<PrimaryKey>>,
C: AsyncConnection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
fn list_async<R, PrimaryKey, C>(
ids: R,
connection: &C
) -> AsyncList<'_, C, Self, PrimaryKey>ⓘNotable traits for AsyncList<'a, Cn, Cl, PrimaryKey>impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
where
R: Into<Range<PrimaryKey>>,
C: AsyncConnection,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
Retrieves all documents matching the range of ids
. Read more
fn list_with_prefix<C>(
prefix: Self::PrimaryKey,
connection: &C
) -> List<'_, C, Self, Self::PrimaryKey> where
C: Connection,
Self::PrimaryKey: IntoPrefixRange,
fn list_with_prefix<C>(
prefix: Self::PrimaryKey,
connection: &C
) -> List<'_, C, Self, Self::PrimaryKey> where
C: Connection,
Self::PrimaryKey: IntoPrefixRange,
Retrieves all documents with ids that start with prefix
. Read more
fn list_with_prefix_async<C>(
prefix: Self::PrimaryKey,
connection: &C
) -> AsyncList<'_, C, Self, Self::PrimaryKey>ⓘNotable traits for AsyncList<'a, Cn, Cl, PrimaryKey>impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
where
C: AsyncConnection,
Self::PrimaryKey: IntoPrefixRange,
fn list_with_prefix_async<C>(
prefix: Self::PrimaryKey,
connection: &C
) -> AsyncList<'_, C, Self, Self::PrimaryKey>ⓘNotable traits for AsyncList<'a, Cn, Cl, PrimaryKey>impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
where
C: AsyncConnection,
Self::PrimaryKey: IntoPrefixRange,
impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
Retrieves all documents with ids that start with prefix
. Read more
Retrieves all documents. Read more
fn all_async<C>(connection: &C) -> AsyncList<'_, C, Self, Self::PrimaryKey>ⓘNotable traits for AsyncList<'a, Cn, Cl, PrimaryKey>impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
where
C: AsyncConnection,
fn all_async<C>(connection: &C) -> AsyncList<'_, C, Self, Self::PrimaryKey>ⓘNotable traits for AsyncList<'a, Cn, Cl, PrimaryKey>impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
where
C: AsyncConnection,
impl<'a, Cn, Cl, PrimaryKey> Future for AsyncList<'a, Cn, Cl, PrimaryKey> where
Cl: SerializedCollection + Unpin,
Cn: AsyncConnection,
PrimaryKey: 'a + for<'k> KeyEncoding<'k, <Cl as Collection>::PrimaryKey> + Unpin,
<Cl as Collection>::PrimaryKey: Unpin, type Output = Result<Vec<CollectionDocument<Cl>, Global>, Error>;
Retrieves all documents. Read more
fn push<Cn>(
contents: Self::Contents,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self::Contents>> where
Cn: Connection,
Self: 'static,
fn push<Cn>(
contents: Self::Contents,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self::Contents>> where
Cn: Connection,
Self: '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: 'static + 'async_trait + Send,
Cn: 'async_trait + AsyncConnection,
Self::Contents: 'async_trait,
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: 'static + 'async_trait + Send,
Cn: 'async_trait + AsyncConnection,
Self::Contents: 'async_trait,
Pushes this value into the collection, returning the created document.
This function is useful when Self != Self::Contents
. Read more
fn push_into<Cn>(
self,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>> where
Cn: Connection,
Self: 'static + SerializedCollection<Contents = Self>,
fn push_into<Cn>(
self,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>> where
Cn: Connection,
Self: 'static + SerializedCollection<Contents = Self>,
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: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
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: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
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: '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: 'static,
Inserts this value into the collection with the specified id, returning the created document. Read more
fn insert_async<'life0, 'async_trait, PrimaryKey, Cn>(
id: PrimaryKey,
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,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: 'static + 'async_trait + Send,
Self::Contents: 'async_trait,
fn insert_async<'life0, 'async_trait, PrimaryKey, Cn>(
id: PrimaryKey,
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,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + '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<PrimaryKey, Cn>(
self,
id: PrimaryKey,
connection: &Cn
) -> Result<CollectionDocument<Self>, InsertError<Self>> where
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey>,
Cn: Connection,
Self: 'static + SerializedCollection<Contents = Self>,
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: 'static + SerializedCollection<Contents = Self>,
Inserts this value into the collection with the given id
, returning
the created document. Read more
fn insert_into_async<'life0, 'async_trait, PrimaryKey, Cn>(
self,
id: PrimaryKey,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
fn insert_into_async<'life0, 'async_trait, PrimaryKey, Cn>(
self,
id: PrimaryKey,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + '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
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: '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: 'static,
Overwrites this value into the collection with the specified id, returning the created or updated document. Read more
fn overwrite_async<'life0, 'async_trait, PrimaryKey, Cn>(
id: PrimaryKey,
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,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: 'static + 'async_trait + Send,
Self::Contents: 'async_trait,
fn overwrite_async<'life0, 'async_trait, PrimaryKey, Cn>(
id: PrimaryKey,
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,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Cn: AsyncConnection + 'async_trait,
Self: 'static + 'async_trait + Send,
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: 'static + SerializedCollection<Contents = Self>,
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: 'static + SerializedCollection<Contents = Self>,
Overwrites this value into the collection with the given id
, returning
the created or updated document. Read more
fn overwrite_into_async<'life0, 'async_trait, Cn, PrimaryKey>(
self,
id: PrimaryKey,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
Cn: 'async_trait + AsyncConnection,
fn overwrite_into_async<'life0, 'async_trait, Cn, PrimaryKey>(
self,
id: PrimaryKey,
connection: &'life0 Cn
) -> Pin<Box<dyn Future<Output = Result<CollectionDocument<Self>, InsertError<Self>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
PrimaryKey: for<'k> KeyEncoding<'k, Self::PrimaryKey> + 'async_trait,
Self: 'static + SerializedCollection<Contents = Self> + 'async_trait + Send,
Cn: 'async_trait + AsyncConnection,
Overwrites this value into the collection with the given id
, returning
the created or updated 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