ErrorErasedStorage
extension MoEngageStorage.ErrorErasedStorage: MoEngageStorage.ReadOnlyLocation
extension MoEngageStorage.ErrorErasedStorage: MoEngageStorage.WriteOnlyLocation
extension MoEngageStorage.ErrorErasedStorage: MoEngageStorage.MigratableLocation
-
Reads using the captured closure, returning
niland logging on failure.Declaration
Swift
public func read( withInput input: Input, fromInstance sdkInstance: isolated MoEngageSDKInstance = #isolation ) -> StoredParameters
inputForwarded to the underlying read closure.
sdkInstanceThe isolated SDK instance to read from.
Return Value
The stored value, or
nilif the read threw an error.
-
Writes using the captured closure, forwarding the result to the caller.
Declaration
Swift
@discardableResult public func write( _ value: Saved, toInstance sdkInstance: isolated MoEngageSDKInstance = #isolation ) -> OutputParameters
valueThe value to persist.
sdkInstanceThe isolated SDK instance to write to.
Return Value
The output produced by the underlying write closure.
-
Removes using the captured closure, logging and absorbing any error.
Declaration
Swift
public func remove( fromInstance sdkInstance: isolated MoEngageSDKInstance = #isolation )Parameters
sdkInstanceThe isolated SDK instance to remove from.