SDKInstanceProperty
extension MoEngageStorage.SDKInstanceProperty: MoEngageStorage.ReadOnlyLocation
extension MoEngageStorage.SDKInstanceProperty: MoEngageStorage.WriteOnlyLocation
extension MoEngageStorage.SDKInstanceProperty: MoEngageStorage.MigratableLocation
where Value: MoEngageStorage.ResettableValue
-
Reads the value from the given SDK instance using the stored getter closure.
Declaration
Swift
public func read( withInput input: Void, fromInstance sdkInstance: isolated MoEngageSDKInstance = #isolation ) throws(ReadError) -> ValueParameters
inputUnused (
Void).sdkInstanceThe isolated SDK instance whose property is read.
Return Value
The current value produced by the getter.
-
Writes a value to the SDK instance using the stored setter closure.
If no setter was provided at initialisation this is a no-op.
Declaration
Swift
public func write( _ value: Value, toInstance sdkInstance: isolated MoEngageSDKInstance = #isolation ) throws(WriteError)Parameters
valueThe value to assign.
sdkInstanceThe isolated SDK instance whose property is updated.
-
Resets the property to
MoEngageStorage/ResettableValue/resetValueby callingwrite.If no setter was provided at initialisation this is a no-op.
Declaration
Swift
public func remove( fromInstance sdkInstance: isolated MoEngageSDKInstance = #isolation ) throws(WriteError)Parameters
sdkInstanceThe isolated SDK instance whose property is reset.