MimiProcessingParameterApplicator

public final class MimiProcessingParameterApplicator<Value> : Identifiable where Value : Equatable, Value : Sendable
extension MimiProcessingParameterApplicator: Equatable

Object that subscribes to a MimiProcessingParameter and allows for parameter values to be applied and propagated to remote data sources.

  • id

    Identifier of the applicator.

    Declaration

    Swift

    public let id: String
  • The value that was last known to have been successfully applied on the applicator.

    This also records a value whose application was reported as failed because it timed out or its caller was cancelled, if apply went on to complete successfully afterwards: the device holds that value. The parameter publishes the value as well once apply has returned, unless another value has been applied since.

    Note

    This will be nil if no successful application has taken place.
    Declaration

    Swift

    public private(set) var latestAppliedValue: Value? { get set }
  • Create a new MimiProcessingParameterApplicator instance.

    Declaration

    Swift

    public init(currentValue: Value? = nil,
                applyTimeout: Double? = nil,
                apply: @escaping @Sendable (Value) async throws -> Void)