pub fn get_doc_store(
caller: UserId,
collection: CollectionKey,
key: Key,
) -> Result<Option<Doc>, String>
Expand description
Get a document from a collection’s store.
This function retrieves a document from a collection’s store based on the specified parameters.
It returns a Result<Option<Doc>, String>
where Ok(Some(Doc))
indicates a successfully retrieved
document, Ok(None)
represents no document found, or an error message as Err(String)
if retrieval
encounters issues.
§Parameters
caller
: TheUserId
representing the caller requesting the document.collection
: ACollectionKey
representing the collection from which to retrieve the document.key
: AKey
identifying the document to be retrieved.
§Returns
Ok(Some(Doc))
: Indicates successful retrieval of a document.Ok(None)
: Indicates no document found for the specified key.Err(String)
: An error message if retrieval fails.
This function allows you to securely retrieve a document from a Juno collection’s store.