MoEngageModuleState

@dynamicMemberLookup
public struct MoEngageModuleState<Spec>

Represnts state of a module.

  • Declaration

    Swift

    public let sdkInstance: MoEngageSDKInstance
  • Declaration

    Swift

    public let spec: Spec
  • Create state for the passed instance and specification.

    Declaration

    Swift

    public init(sdkInstance: MoEngageSDKInstance, spec: Spec)

    Parameters

    sdkInstance

    The SDK instance.

    spec

    The storage specification.

  • Return data for provided storage location..

    Declaration

    Swift

    public subscript<Location: MoEngageStorageLocation>(
        dynamicMember keyPath: KeyPath<Spec, Location>
    ) -> Location.Stored

    Parameters

    keyPath

    The path to storage location specification.

  • Manage data for provided storage location..

    Declaration

    Swift

    public subscript<Location: MoEngageStorageLocation>(
        dynamicMember keyPath: WritableKeyPath<Spec, Location>
    ) -> Location.Stored

    Parameters

    keyPath

    The path to storage location specification.

  • Manage data for provided storage location..

    Declaration

    Swift

    public subscript<Location: MoEngageStorageLocation, Input>(
        dynamicMember keyPath: KeyPath<Spec, (Input) -> Location>
    ) -> (Input) -> Location.Stored

    Parameters

    keyPath

    The path to storage location specification.