Instance Propertyswift 6.0.3Swift
debugDescription
A textual representation of the collection, suitable for debugging.
var debugDescription: String { get }
A textual representation of the collection, suitable for debugging.
var debugDescription: String { get }
import Swift
@frozen struct CollectionOfOne<Element>
A collection containing a single element.
@frozen struct String
A Unicode string value that is a collection of characters.
init(_ element: Element)
Creates an instance containing just the given element.
var count: Int { get }
The number of elements in the collection, which is always one.
var customMirror: Mirror { get }
var endIndex: CollectionOfOne<Element>.Index { get }
The “past the end” position—that is, the position one greater than the last valid subscript argument.
var startIndex: CollectionOfOne<Element>.Index { get }
The position of the first element.
subscript(bounds: Range<Int>) -> CollectionOfOne<Element>.SubSequence { get set }
subscript(position: Int) -> Element { get set }
Accesses the element at the specified position.
func index(after i: CollectionOfOne<Element>.Index) -> CollectionOfOne<Element>.Index
Returns the position immediately after the given index.
func index(before i: CollectionOfOne<Element>.Index) -> CollectionOfOne<Element>.Index
Returns the position immediately before the given index.
func makeIterator() -> CollectionOfOne<Element>.Iterator
Returns an iterator over the elements of this collection.
@frozen struct Iterator
An iterator that produces one or zero instances of an element.
typealias Index = Int
typealias Indices = Range<Int>
typealias SubSequence = Slice<CollectionOfOne<Element>>