on_set_many_docs

Attribute Macro on_set_many_docs 

Source
#[on_set_many_docs]
Expand description

The on_set_many_docs function is a procedural macro attribute for hooking into the OnSetManyDocs event. It allows you to define custom logic to be executed when multiple documents are set.

Example:

#[on_set_many_docs]
async fn on_set_many_docs(context: OnSetManyDocsContext) -> Result<(), String> {
    // Your hook logic here
}

When no attributes are provided, the hook is triggered for any document set within any collection. You can scope the events to a particular list of collections.

Example:

#[on_set_many_docs(collections = ["demo"])]
async fn on_set_many_docs(context: OnSetManyDocsContext) -> Result<(), String> {
    // Your hook logic here
}

The attributes accept a list of comma-separated collections. If the attribute array is left empty, the hook will never be called.