Structures

The following structures are available globally.

  • The NIO.ChannelOutboundHandler.OutboundIn type for RedisCommandHandler.

    This holds the full command message to be sent to Redis, and an NIO.EventLoopPromise to be fulfilled when a response has been received.

    Important

    This struct has reference semantics due to the retention of the NIO.EventLoopPromise.
    See more

    Declaration

    Swift

    public struct RedisCommand
  • A condition which must hold true in order for a key to be set.

    See https://redis.io/commands/set

    See more

    Declaration

    Swift

    public struct RedisSetCommandCondition : Hashable
  • The expiration to apply when setting a key.

    See https://redis.io/commands/set

    See more

    Declaration

    Swift

    public struct RedisSetCommandExpiration : Hashable
  • If something goes wrong with any part of the Redis connection pool, errors of this type will be thrown.

    See more

    Declaration

    Swift

    public struct RedisConnectionPoolError : LocalizedError, Equatable
  • A helper object for translating between raw bytes and Swift types according to the Redis Serialization Protocol (RESP).

    See https://redis.io/topics/protocol

    See more

    Declaration

    Swift

    public struct RESPTranslator
  • When working with RedisClient, runtime errors can be thrown to indicate problems with connection state, decoding assertions, or otherwise.

    See more

    Declaration

    Swift

    public struct RedisClientError : LocalizedError, Equatable, Hashable
  • If something goes wrong with a command within Redis, it will respond with an error that is captured and represented by instances of this type.

    See more

    Declaration

    Swift

    public struct RedisError : LocalizedError
    extension RedisError: Equatable, Hashable
    extension RedisError: RESPValueConvertible
  • A representation of a key in Redis.

    RedisKey is a thin wrapper around String, to provide stronger type-safety at compile-time.

    It conforms to ExpressibleByStringLiteral and ExpressibleByStringInterpolation, so creating a key is simple:

    let key: RedisKey = "foo" // or "\(someVar)"
    
    See more

    Declaration

    Swift

    public struct RedisKey:
        RESPValueConvertible,
        RawRepresentable,
        ExpressibleByStringLiteral,
        ExpressibleByStringInterpolation,
        CustomStringConvertible, CustomDebugStringConvertible,
        Comparable, Hashable, Codable
  • The system funnel for all Metrics interactions from the Redis library.

    It is highly recommended to not interact with this directly, and to let the library use it how it sees fit.

    There is a nested enum type of RedisMetrics.Label that is available to query, match, etc. the labels used for all of the Metrics types created by the Redis library.

    See more

    Declaration

    Swift

    public struct RedisMetrics