pub fn delete_doc_store(
caller: UserId,
collection: CollectionKey,
key: Key,
value: DelDoc,
) -> Result<DocContext<Option<Doc>>, String>
Expand description
Delete Delete a document from a collection’s store.
This function deletes a document from a collection’s store based on the specified parameters.
It returns a Result
with Ok(DocContext<Option<Doc>>)
on success, containing information
about the deleted document, or an error message as Err(String)
if the deletion encounters issues.
§Parameters
caller
: TheUserId
representing the caller initiating the deletion.collection
: ACollectionKey
representing the collection from which to delete the document.key
: AKey
identifying the document to be deleted.value
: An instance ofDelDoc
representing the deletion action.
§Returns
Ok(DocContext<Option<Doc>>)
:key
: TheKey
of the deleted document.collection
: TheCollectionKey
from which the document was deleted.data
: AnOption<Doc>
representing the deleted document data, if available.
Err(String)
: An error message if the deletion operation fails.
This function allows you to securely delete documents from a Juno collection’s store, returning relevant context information or error messages.