ClosedRange (ext)
You’re viewing third-party extensions to ClosedRange
, a struct from the Swift standard library.
You can also read the documentation forClosedRange
itself.
extension ClosedRange
You’re viewing third-party extensions to ClosedRange
, a struct from the Swift standard library.
You can also read the documentation forClosedRange
itself.
extension ClosedRange
@frozen struct ClosedRange<Bound> where Bound : Comparable
An interval from a lower bound up to, and including, an upper bound.
import BSONArrays
protocol BinaryPackable<Storage>
protocol Comparable : Equatable
A type that can be compared using the relational operators <
, <=
, >=
, and >
.
static func get(_ storage: Storage) -> ClosedRange<Bound>
consuming func set() -> Storage
typealias Storage = (Bound.Storage, Bound.Storage)
import BSON
An umbrella module providing a BSON parser, encoder, and decoder.
protocol BSONDecodable
A type that can be decoded from a BSON variant value backed by some type of storage not particular to the decoded type.
protocol BSONDocumentDecodable<CodingKey> : BSONDecodable
A type that can be decoded from a BSON dictionary-decoder.
init(bson: BSON.DocumentDecoder<CodingKey>) throws
If the range is invalid, the initializer throws an error.
init(bson: BSON.AnyValue) throws
init(bson: BSON.Document) throws
protocol BSONEncodable
A type that can be encoded to a BSON variant value.
protocol BSONDocumentEncodable<CodingKey> : BSONEncodable
A type that can be encoded to a BSON document. This protocol exists to allow types that define CodingKey
to encode themselves using a BSON.DocumentEncoder
.
func encode(to bson: inout BSON.DocumentEncoder<CodingKey>)
func encode(to field: inout BSON.FieldEncoder)
@frozen enum CodingKey
The default BSON representation of a ClosedRange
, which is a BSON document keyed by L
(lowerBound
) and U
(upperBound
).