MoEngageModuleState

@available(*, deprecated, renamed: "MoEngageStorage.State")
@dynamicMemberLookup
public struct MoEngageModuleState<Spec> : @unchecked Sendable

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 by read-only storage location..

    Declaration

    Swift

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

    Parameters

    keyPath

    The path to storage location 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.

  • Return data for provided storage location..

    Declaration

    Swift

    public subscript<Location: MoEngageStorage.ReadOnlyLocation>(
        dynamicMember keyPath: KeyPath<Spec, Location>
    ) -> Location.Stored? where Location.Input == Void, Location.Stored: Sendable

    Parameters

    keyPath

    The path to storage location specification.

  • Manage data for provided storage location..

    Declaration

    Swift

    public subscript<Location: MoEngageStorage.Location>(
        dynamicMember keyPath: WritableKeyPath<Spec, Location>
    ) -> Location.Stored? where Location.Input == Void, Location.Output == Void, Location.Stored == Location.Saved, Location.Stored: Sendable

    Parameters

    keyPath

    The path to storage location specification.

  • Return data for provided storage location..

    Declaration

    Swift

    public subscript<Location: MoEngageStorage.ReadOnlyLocation, Wrapped>(
        dynamicMember keyPath: KeyPath<Spec, Location>
    ) -> Location.Stored where Location.Input == Void, Location.Stored == Wrapped?, Wrapped: Sendable

    Parameters

    keyPath

    The path to storage location specification.

  • Manage data for provided storage location..

    Declaration

    Swift

    public subscript<Location: MoEngageStorage.Location, Wrapped>(
        dynamicMember keyPath: WritableKeyPath<Spec, Location>
    ) -> Location.Stored where Location.Input == Void, Location.Output == Void, Location.Stored == Location.Saved, Location.Stored == Wrapped?, Wrapped: Sendable

    Parameters

    keyPath

    The path to storage location specification.

  • Manage data for provided storage location..

    Declaration

    Swift

    public subscript<Location: MoEngageStorage.Location>(
        dynamicMember keyPath: WritableKeyPath<Spec, Location>
    ) -> Location.Stored where Location.Input == Void, Location.Output == Void, Location.Stored == Location.Saved, Location.ReadError == Never, Location.WriteError == Never, Location.RemoveError == Never, Location.Saved: Sendable

    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.