CustomWitnessedSet
public struct CustomWitnessedSet<Witness> where Witness : HashableWitness
extension CustomWitnessedSet: Collection
extension CustomWitnessedSet: SetAlgebra
extension CustomWitnessedSet: Hashable
extension CustomWitnessedSet: ExpressibleByArrayLiteral
extension CustomWitnessedSet: CustomStringConvertible
extension CustomWitnessedSet: Sendable where Witness.Element: Sendable, Witness: Sendable
An unordered collection of unique elements using a custom hash witness.
-
The type of the elements in the set.
Declaration
Swift
public typealias Element = Witness.Element -
An element wrapped into a hashable box.
Declaration
Swift
fileprivate typealias _Element = HashableBox<Witness> -
The contents of
self.Declaration
Swift
fileprivate var contents: Set<_Element> -
Creates an instance with the elements in
members. -
Reserves enough space to store the specified number of elements.
Declaration
Swift
public mutating func reserve(minimumCapacity: Int) -
Removes and returns an element from
self.Declaration
Swift
public mutating func popFirst() -> Element? -
Declaration
Swift
public struct Index : Comparable -
Declaration
Swift
public var isEmpty: Bool { get } -
Declaration
Swift
public var count: Int { get } -
Declaration
Swift
public var startIndex: Index { get } -
Declaration
Swift
public var endIndex: Index { get } -
-
-
Declaration
Swift
public func contains(_ member: Element) -> Bool -
Declaration
Swift
public init() -
Declaration
-
-
-
Declaration
Swift
public func union(_ other: `Self`) -> CustomWitnessedSet<Witness> -
Inserts the elements in
membersintoself.Declaration
-
Declaration
Swift
public mutating func formUnion(_ other: `Self`) -
Declaration
Swift
public func intersection(_ other: `Self`) -> CustomWitnessedSet<Witness> -
Declaration
Swift
public mutating func formIntersection(_ other: `Self`) -
Declaration
Swift
public func symmetricDifference(_ other: `Self`) -> CustomWitnessedSet<Witness> -
Declaration
Swift
public mutating func formSymmetricDifference(_ other: `Self`) -
Declaration
Swift
public func subtracting(_ other: `Self`) -> CustomWitnessedSet<Witness> -
Declaration
Swift
public mutating func subtract(_ other: `Self`) -
Declaration
Swift
public init(arrayLiteral members: Element...) -
Declaration
Swift
public var description: String { get }
View on GitHub