AnyIndex
A wrapper over an underlying index that hides the specific underlying type.
@frozen struct AnyIndex
Citizens in Swift
Conformances
protocol Comparable
A type that can be compared using the relational operators
<
,<=
,>=
, and>
.protocol Equatable
A type that can be compared for value equality.
Members
init<BaseIndex>(BaseIndex
) Creates a new index wrapping
base
.static func < (AnyIndex, AnyIndex
) -> Bool Returns a Boolean value indicating whether the first argument represents a position before the second argument.
static func == (AnyIndex, AnyIndex
) -> Bool Returns a Boolean value indicating whether two indices wrap equal underlying indices.
Features
static func != (Self, Self
) -> Bool static func ... (Self
) -> PartialRangeFrom<Self> Returns a partial range extending upward from a lower bound.
static func ... (Self
) -> PartialRangeThrough<Self> Returns a partial range up to, and including, its upper bound.
static func ... (Self, Self
) -> ClosedRange<Self> Returns a closed range that contains both of its bounds.
static func ..< (Self
) -> PartialRangeUpTo<Self> Returns a partial range up to, but not including, its upper bound.
static func ..< (Self, Self
) -> Range<Self> Returns a half-open range that contains its lower bound but not its upper bound.