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