Other Enumerations

The following enumerations are available globally.

  • Errors that can occur during remote command execution.

    These errors represent validation failures and missing required parameters. All errors provide descriptive messages for centralized logging in dispatchers.

    See more

    Declaration

    Swift

    public enum CommandError : ErrorEnum, ErrorWrapping
  • A collection of lenient converters that can handle type mismatches in JSON data.

    These converters attempt multiple conversion strategies when the actual type in JSON differs from the expected type. They follow a fail-safe pattern: returning nil for invalid or non-representable values rather than crashing or producing corrupted data.

    Edge cases handled:

    • Integer overflow: NaN values return nil; values outside Int.min...Int.max (including infinities) are clamped to Int.min/Int.max
    • Special float values: Double.nan is treated as invalid; Double.infinity and -Double.infinity are clamped in integer conversions
    • String parsing: Invalid formats return nil rather than crashing
    • Type mismatches: Missing or incompatible types return nil

    Example usage:

    let payload: DataObject = ...
    let timeout = payload.getConvertible(key: "timeout", converter: LenientConverters.double)
    let retryCount = payload.getConvertible(key: "retryCount", converter: LenientConverters.int)
    let isEnabled = payload.getConvertible(key: "isEnabled", converter: LenientConverters.bool)
    
    See more

    Declaration

    Swift

    public enum LenientConverters
  • Represents the source of a value used in a transformation operation.

    A ValueSource can either reference an existing value in the dispatch payload or provide a constant value directly.

    See more

    Declaration

    Swift

    public enum ValueSource : DataInputConvertible
  • A collection of utility functions for working with strings.

    See more

    Declaration

    Swift

    public enum StringUtils

VALUES