StoredSettingsValue
@propertyWrapper
class StoredSettingsValue<T>: SettingsValue<T>, StoredSetting
where T: Encodable & RESPValueConvertible
Wraps settings properties, making them thread-safe. Contains methods for loading/storing values from a Redis hash. Use this for settings that should be database-backed.
-
Declaration
Swift
var projectedValue: StoredSettingsValue<T> { get }
-
Declaration
Swift
var redisField: String
-
Declaration
Swift
override var wrappedValue: T { get set }
-
Declaration
Swift
init(_ field: String, defaultValue: T)
-
readFromRedis(redis:
Asynchronous) Declaration
Swift
func readFromRedis(redis: RedisClient) async throws
-
writeToRedis(redis:
Asynchronous) Declaration
Swift
func writeToRedis(redis: RedisClient) async throws -> Bool