AsyncDynamicStorage
extension MoEngageStorage.AsyncDynamicStorage: MoEngageStorage.AsyncReadOnlyLocation
where Base: MoEngageStorage.AsyncReadOnlyLocation, Base.Input == BaseInput
extension MoEngageStorage.AsyncDynamicStorage: MoEngageStorage.AsyncWriteOnlyLocation
where Base: MoEngageStorage.AsyncWriteOnlyLocation, Base.Saved == BaseInput
-
read(withInput:AsynchronousfromInstance: ) Builds the location from
inputviafactory, then awaits its read.Throws
Base.ReadErrorpropagated from the underlying location.Declaration
Swift
public func read( withInput input: Input, fromInstance sdkInstance: isolated MoEngageSDKInstance = #isolation ) async throws(Base.ReadError) -> Base.StoredParameters
inputForwarded to both
factoryandinputTransform.sdkInstanceThe isolated SDK instance passed to
factory,inputTransform, and the resulting location’sread.Return Value
The value stored at the location selected by
factory.
-
write(_:AsynchronoustoInstance: ) Builds the location from
value.inputviafactory, then awaits its write withvalue.value.Throws
Base.WriteErrorpropagated from the underlying location.Declaration
Swift
@discardableResult public func write( _ value: Input, toInstance sdkInstance: isolated MoEngageSDKInstance = #isolation ) async throws(Base.WriteError) -> Base.OutputParameters
valueThe composite value from which
factoryselects the location and whosevalueis the payload to save.sdkInstanceThe isolated SDK instance passed to
factoryand the resulting location’swrite.