pub fn SetStorageItem(
TargetObjectValue: Value,
ValueToSet: Value,
) -> ActionEffect<Arc<dyn StorageProvider>, CommonError, ()>Expand description
Creates an effect that, when executed, will set or update an item in either global or workspace-scoped Memento storage.
It uses the StorageProvider capability from the environment to perform the
actual data persistence on the host.
§Parameters
TargetObjectValue: Aserde_json::Valueexpected to be an object with the following fields:Scope(boolean, optional):truefor global scope,falseor absent for workspace scope.Key(string, required): The key of the item to set or update.
ValueToSet: Theserde_json::Valueto store. If this value isValue::Null, the effect will delete the item from storage.
§Returns
An ActionEffect that resolves to () on success.