Set
extension Set
-
Creates a set containing the elements of a cursor.
// Set<String> let cursor = try String.fetchCursor(db, ...) let strings = try Set(cursor)Declaration
Swift
public init(_ cursor: some Cursor<Element>) throwsParameters
cursorA cursor of values to gather into a set.
-
Creates a set containing the elements of a cursor.
// Set<String> let cursor = try String.fetchCursor(db, ...) let strings = try Set(cursor, minimumCapacity: 100)Declaration
Swift
public init(_ cursor: some Cursor<Element>, minimumCapacity: Int) throwsParameters
cursorA cursor of values to gather into a set.
minimumCapacityThe minimum number of elements that the newly created set should be able to store without reallocating its storage buffer.
View on GitHub
Install in Dash
Set Extension Reference