async fn delete<C: schema::Collection>(&self, doc: &Document) -> Result<(), Error> {
        let results = self
            .apply_transaction(Transaction::delete(
                C::collection_name()?,
                doc.header.clone(),
            ))
            .await?;
        if let OperationResult::DocumentDeleted { .. } = &results[0] {
            Ok(())
        } else {
            unreachable!(
                "apply_transaction on a single update should yield a single DocumentUpdated entry"
            )
        }
    }
/// Removes a `Document` from the database.
Removes a `Document` from the database.
Removes a ` Document ` from the database .
async fn delete<C: schema::Collection>(&self, doc: &Document) -> Result<(), Error> {
        let results = self
            .apply_transaction(Transaction::delete(
                C::collection_name()?,
                doc.header.clone(),
            ))
            .await?;
        if let OperationResult::DocumentDeleted { .. } = &results[0] {
            Ok(())
        } else {
            unreachable!(
                "apply_transaction on a single update should yield a single DocumentUpdated entry"
            )
        }
    }
async fn delete < C : schema :: Collection > ( & self , doc : & Document ) -> Result < ( ) , Error > { let results = self . apply_transaction ( Transaction :: delete ( C :: collection_name ( ) ? , doc . header . clone ( ) , ) ) . await ? ; if let OperationResult :: DocumentDeleted { .. } = & results [ 0 ] { Ok ( ( ) ) } else { unreachable ! ( " " ) } }
Removes a `Document` from the database.
Removes a ` Document ` from the database .
&self
doc
&Document
&self
doc
&Document