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 moreDeclaration
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
nilfor invalid or non-representable values rather than crashing or producing corrupted data.Edge cases handled:
- Integer overflow: NaN values return
nil; values outsideInt.min...Int.max(including infinities) are clamped toInt.min/Int.max - Special float values:
Double.nanis treated as invalid;Double.infinityand-Double.infinityare clamped in integer conversions - String parsing: Invalid formats return
nilrather than crashing - Type mismatches: Missing or incompatible types return
nil
Example usage:
See morelet 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)Declaration
Swift
public enum LenientConverters - Integer overflow: NaN values return
-
Represents the source of a value used in a transformation operation.
A
See moreValueSourcecan either reference an existing value in the dispatch payload or provide a constant value directly.Declaration
Swift
public enum ValueSource : DataInputConvertible -
A collection of utility functions for working with strings.
See moreDeclaration
Swift
public enum StringUtils
View on GitHub
Other Enumerations Reference