Structures

The following structures are available globally.

  • Undocumented

    See more

    Declaration

    Swift

    public struct AnyHashableAndSendable : @unchecked Sendable, Hashable, Equatable
    extension AnyHashableAndSendable: CustomStringConvertible
  • An array of bit values represented as Booleans, where true indicates that the bit is on.

    See more

    Declaration

    Swift

    public struct BitArray : Sendable
    extension BitArray: Equatable
    extension BitArray: Hashable
    extension BitArray: MutableCollection
    extension BitArray: CustomStringConvertible
  • A collection contiguous slices partitioning a some base collection.

    See more

    Declaration

    Swift

    public struct Chunks<Base> where Base : Collection
    extension Chunks: Collection
  • An unordered collection of unique elements using a custom hash witness.

    See more

    Declaration

    Swift

    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
  • The absence of a label in a directed graph.

    See more

    Declaration

    Swift

    public struct NoLabel : Hashable, Sendable
  • A finite, directed graph.

    Note

    Use DirectedGraph<V, NoLabel> rather than DirectedGraph<V, Void> to implement an unlabeled graph. Unlike Void, NoLabel conforms to Equatable, allowing the graph itself to be Equatable.
    See more

    Declaration

    Swift

    public struct DirectedGraph<Vertex, Label> : Sendable where Vertex : Hashable, Vertex : Sendable, Label : Sendable
    extension DirectedGraph: Equatable where Label: Equatable
    extension DirectedGraph: Hashable where Label: Hashable
  • The vertices of a graph collected in a breadth-first manner.

    See more

    Declaration

    Swift

    public struct BreadthFirstSequence<Vertex, Label> : IteratorProtocol, Sequence where Vertex : Hashable, Vertex : Sendable, Label : Sendable
  • Undocumented

    See more

    Declaration

    Swift

    public struct DistinctNameGenerator<Key> : Sendable where Key : Equatable, Key : Sendable
  • A doubly linked list.

    See more

    Declaration

    Swift

    public struct DoublyLinkedList<Element>
    extension DoublyLinkedList: BidirectionalCollection, MutableCollection
    extension DoublyLinkedList: ExpressibleByArrayLiteral
    extension DoublyLinkedList: CustomStringConvertible
    extension DoublyLinkedList: Equatable where Element: Equatable
    extension DoublyLinkedList: Hashable where Element: Hashable
    extension DoublyLinkedList: Sendable where Element: Sendable
  • A wrapper implementing a value’s conformance to Hashable with a custom witness.

    See more

    Declaration

    Swift

    public struct HashableBox<Witness> : Hashable where Witness : HashableWitness
    extension HashableBox: Sendable where Witness.Element: Sendable
  • A wrapper type signaling that the wrapped value is incidental for the purpose of hashing and equality comparison.

    See more

    Declaration

    Swift

    public struct Incidental<T> : Hashable
    extension Incidental : Sendable where T: Sendable
  • A wrapper type allocating T out-of-line.

    See more

    Declaration

    Swift

    public struct Indirect<T>
    extension Indirect: @unchecked Sendable where T: Sendable
    extension Indirect: Equatable where T: Equatable
    extension Indirect: Hashable where T: Hashable
    extension Indirect: Comparable where T: Comparable
    extension Indirect: CustomStringConvertible where T: CustomStringConvertible
  • A lazily computed value.

    The value is not computed unless accessed and is computed no more than once no matter how many times it is copied or accessed.

    See more

    Declaration

    Swift

    public struct Lazy<T> where T : Sendable
    extension Lazy: Sendable where T: Sendable
  • A lazily computed value whose computation might throw.

    The actual value is not computed unless accessed and is computed no more than once no matter how many times this value is copied or accessed. If the value computation throws, each access to this value (or copy of it) throws the same error as the original access.

    See more

    Declaration

    Swift

    public struct LazyThrowing<T> where T : Sendable
    extension LazyThrowing: Sendable where T: Sendable
  • The strongly connected components of a directed graph.

    See more

    Declaration

    Swift

    public struct StronglyConnectedComponents<Vertex> where Vertex : Hashable
    extension StronglyConnectedComponents: Sendable where Vertex: Sendable
  • A trie (a.k.a. prefix tree).

    See more

    Declaration

    Swift

    public struct Trie<Key, Value> : Sendable where Key : Collection, Key : Sendable, Value : Sendable, Key.Element : Hashable, Key.Element : Sendable
    extension Trie: CustomStringConvertible
    extension Trie: Equatable where Value: Equatable
    extension Trie: Hashable where Value: Hashable
  • A part of a trie.

    See more

    Declaration

    Swift

    public struct SubTrie<Key, Value> : Sendable where Key : Collection, Key : Sendable, Value : Sendable, Key.Element : Hashable, Key.Element : Sendable
    extension SubTrie: CustomStringConvertible
  • An unsigned integer with an arbitrary, but fixed, bit width.

    See more

    Declaration

    Swift

    public struct WideUInt : Sendable
    extension WideUInt: Hashable
    extension WideUInt: Comparable
    extension WideUInt: Numeric, AdditiveArithmetic
    extension WideUInt: CustomStringConvertible