Struct mungos::Collection
source · [−]pub struct Collection<T> {
pub collection: MongoCollection<T>,
}
Fields
collection: MongoCollection<T>
Implementations
sourceimpl<T: Serialize> Collection<T>
impl<T: Serialize> Collection<T>
pub async fn create_many(&self, items: Vec<T>) -> Result<()>
sourceimpl<T: Serialize> Collection<T>
impl<T: Serialize> Collection<T>
pub async fn create_one(&self, item: T) -> Result<String>
sourceimpl<T> Collection<T>
impl<T> Collection<T>
pub async fn delete_many(&self, filter: Document) -> Result<DeleteResult>
sourceimpl<T> Collection<T>
impl<T> Collection<T>
pub async fn delete_one(&self, id: &str) -> Result<String>
sourceimpl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
impl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
sourceimpl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
impl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
sourceimpl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
impl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
sourceimpl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
impl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
sourceimpl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
impl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
sourceimpl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
impl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
sourceimpl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
impl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
sourceimpl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
impl<T: DeserializeOwned + Unpin + Send + Sync> Collection<T>
sourceimpl<Any> Collection<Any>
impl<Any> Collection<Any>
sourceimpl<Any> Collection<Any>
impl<Any> Collection<Any>
sourceimpl<T> Collection<T>
impl<T> Collection<T>
pub async fn upsert(
&self,
query: Document,
update: impl Into<UpdateModifications>
) -> Result<UpdateResult>
Auto Trait Implementations
impl<T> !RefUnwindSafe for Collection<T>
impl<T> Send for Collection<T> where
T: Send,
impl<T> Sync for Collection<T> where
T: Sync,
impl<T> Unpin for Collection<T> where
T: Unpin,
impl<T> !UnwindSafe for Collection<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more