diff --git a/Sources/SwiftMemcache/Extensions/UInt8+Characters.swift b/Sources/SwiftMemcache/Extensions/UInt8+Characters.swift index 06c671d..e803e36 100644 --- a/Sources/SwiftMemcache/Extensions/UInt8+Characters.swift +++ b/Sources/SwiftMemcache/Extensions/UInt8+Characters.swift @@ -13,24 +13,24 @@ //===----------------------------------------------------------------------===// extension UInt8 { - static var whitespace: UInt8 = .init(ascii: " ") - static var newline: UInt8 = .init(ascii: "\n") - static var carriageReturn: UInt8 = .init(ascii: "\r") - static var m: UInt8 = .init(ascii: "m") - static var s: UInt8 = .init(ascii: "s") - static var g: UInt8 = .init(ascii: "g") - static var d: UInt8 = .init(ascii: "d") - static var a: UInt8 = .init(ascii: "a") - static var v: UInt8 = .init(ascii: "v") - static var T: UInt8 = .init(ascii: "T") - static var M: UInt8 = .init(ascii: "M") - static var P: UInt8 = .init(ascii: "P") - static var A: UInt8 = .init(ascii: "A") - static var E: UInt8 = .init(ascii: "E") - static var R: UInt8 = .init(ascii: "R") - static var D: UInt8 = .init(ascii: "D") - static var zero: UInt8 = .init(ascii: "0") - static var nine: UInt8 = .init(ascii: "9") - static var increment: UInt8 = .init(ascii: "+") - static var decrement: UInt8 = .init(ascii: "-") + static let whitespace: UInt8 = .init(ascii: " ") + static let newline: UInt8 = .init(ascii: "\n") + static let carriageReturn: UInt8 = .init(ascii: "\r") + static let m: UInt8 = .init(ascii: "m") + static let s: UInt8 = .init(ascii: "s") + static let g: UInt8 = .init(ascii: "g") + static let d: UInt8 = .init(ascii: "d") + static let a: UInt8 = .init(ascii: "a") + static let v: UInt8 = .init(ascii: "v") + static let T: UInt8 = .init(ascii: "T") + static let M: UInt8 = .init(ascii: "M") + static let P: UInt8 = .init(ascii: "P") + static let A: UInt8 = .init(ascii: "A") + static let E: UInt8 = .init(ascii: "E") + static let R: UInt8 = .init(ascii: "R") + static let D: UInt8 = .init(ascii: "D") + static let zero: UInt8 = .init(ascii: "0") + static let nine: UInt8 = .init(ascii: "9") + static let increment: UInt8 = .init(ascii: "+") + static let decrement: UInt8 = .init(ascii: "-") } diff --git a/Sources/SwiftMemcache/MemcachedFlags.swift b/Sources/SwiftMemcache/MemcachedFlags.swift index e098b6f..ba7c058 100644 --- a/Sources/SwiftMemcache/MemcachedFlags.swift +++ b/Sources/SwiftMemcache/MemcachedFlags.swift @@ -18,7 +18,7 @@ /// The 'v' flag for the meta get command dictates whether the item value should be returned in the data block. /// The 'T' flag is used for both the meta get and meta set commands to specify the Time-To-Live (TTL) for an item. /// The 't' flag for the meta get command indicates whether the Time-To-Live (TTL) for the item should be returned. -struct MemcachedFlags { +struct MemcachedFlags: Sendable { /// Flag 'v' for the 'mg' (meta get) command. /// /// If true, the item value is returned in the data block. @@ -46,7 +46,7 @@ struct MemcachedFlags { } /// Enum representing the Time-To-Live (TTL) of a Memcached value. -public enum TimeToLive: Equatable, Hashable { +public enum TimeToLive: Sendable, Equatable, Hashable { /// The value should never expire. case indefinitely /// The value should expire after a specified time. diff --git a/Sources/SwiftMemcache/MemcachedRequest.swift b/Sources/SwiftMemcache/MemcachedRequest.swift index 5b9b03e..2a18efa 100644 --- a/Sources/SwiftMemcache/MemcachedRequest.swift +++ b/Sources/SwiftMemcache/MemcachedRequest.swift @@ -13,19 +13,19 @@ //===----------------------------------------------------------------------===// import NIOCore -enum MemcachedRequest { - struct SetCommand { +enum MemcachedRequest: Sendable { + struct SetCommand: Sendable { let key: String var value: ByteBuffer var flags: MemcachedFlags? } - struct GetCommand { + struct GetCommand: Sendable { let key: String var flags: MemcachedFlags } - struct DeleteCommand { + struct DeleteCommand: Sendable { let key: String }