pub fn get_asset_store(
caller: Principal,
collection: &CollectionKey,
full_path: FullPath,
) -> Result<Option<Asset>, String>
Expand description
Get an asset from a collection’s store.
This function retrieves an asset from a collection’s store based on the specified parameters.
It returns a Result<Option<Asset>, String>
where Ok(Some(Asset))
indicates a successfully retrieved
asset, Ok(None)
represents no asset found for the specified path, or an error message as Err(String)
if retrieval encounters issues.
§Parameters
caller
: ThePrincipal
representing the caller requesting the asset.collection
: A reference to theCollectionKey
representing the collection from which to retrieve the asset.full_path
: AFullPath
identifying the asset to be retrieved.
§Returns
Ok(Some(Asset))
: Indicates successful retrieval of the asset.Ok(None)
: Indicates no asset found for the specified path.Err(String)
: An error message if the retrieval operation fails.
This function allows you to securely retrieve an asset from a Juno collection’s store.