Structures
The following structures are available globally.
-
Undocumented
See moreDeclaration
Swift
public struct AnyHashableAndSendable : @unchecked Sendable, Hashable, Equatableextension AnyHashableAndSendable: CustomStringConvertible -
An array of bit values represented as Booleans, where
See moretrueindicates that the bit is on.Declaration
Swift
public struct BitArray : Sendableextension BitArray: Equatableextension BitArray: Hashableextension BitArray: MutableCollectionextension BitArray: CustomStringConvertible -
A collection contiguous slices partitioning a some base collection.
See moreDeclaration
Swift
public struct Chunks<Base> where Base : Collectionextension Chunks: Collection -
An unordered collection of unique elements using a custom hash witness.
See moreDeclaration
Swift
public struct CustomWitnessedSet<Witness> where Witness : HashableWitnessextension CustomWitnessedSet: Collectionextension CustomWitnessedSet: SetAlgebraextension CustomWitnessedSet: Hashableextension CustomWitnessedSet: ExpressibleByArrayLiteralextension CustomWitnessedSet: CustomStringConvertibleextension CustomWitnessedSet: Sendable where Witness.Element: Sendable, Witness: Sendable -
The absence of a label in a directed graph.
See moreDeclaration
Swift
public struct NoLabel : Hashable, Sendable -
A finite, directed graph.
See moreNote
UseDirectedGraph<V, NoLabel>rather thanDirectedGraph<V, Void>to implement an unlabeled graph. UnlikeVoid,NoLabelconforms toEquatable, allowing the graph itself to beEquatable.Declaration
Swift
public struct DirectedGraph<Vertex, Label> : Sendable where Vertex : Hashable, Vertex : Sendable, Label : Sendableextension DirectedGraph: Equatable where Label: Equatableextension DirectedGraph: Hashable where Label: Hashable -
The vertices of a graph collected in a breadth-first manner.
See moreDeclaration
Swift
public struct BreadthFirstSequence<Vertex, Label> : IteratorProtocol, Sequence where Vertex : Hashable, Vertex : Sendable, Label : Sendable -
Undocumented
See moreDeclaration
Swift
public struct DistinctNameGenerator<Key> : Sendable where Key : Equatable, Key : Sendable -
A doubly linked list.
See moreDeclaration
Swift
public struct DoublyLinkedList<Element>extension DoublyLinkedList: BidirectionalCollection, MutableCollectionextension DoublyLinkedList: ExpressibleByArrayLiteralextension DoublyLinkedList: CustomStringConvertibleextension DoublyLinkedList: Equatable where Element: Equatableextension DoublyLinkedList: Hashable where Element: Hashableextension DoublyLinkedList: Sendable where Element: Sendable -
A wrapper implementing a value’s conformance to
See moreHashablewith a custom witness.Declaration
Swift
public struct HashableBox<Witness> : Hashable where Witness : HashableWitnessextension 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 moreDeclaration
Swift
public struct Incidental<T> : Hashableextension Incidental : Sendable where T: Sendable -
A wrapper type allocating
See moreTout-of-line.Declaration
Swift
public struct Indirect<T>extension Indirect: @unchecked Sendable where T: Sendableextension Indirect: Equatable where T: Equatableextension Indirect: Hashable where T: Hashableextension Indirect: Comparable where T: Comparableextension 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 moreDeclaration
Swift
public struct Lazy<T> where T : Sendableextension 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 moreDeclaration
Swift
public struct LazyThrowing<T> where T : Sendableextension LazyThrowing: Sendable where T: Sendable -
The strongly connected components of a directed graph.
See moreDeclaration
Swift
public struct StronglyConnectedComponents<Vertex> where Vertex : Hashableextension StronglyConnectedComponents: Sendable where Vertex: Sendable -
A trie (a.k.a. prefix tree).
See moreDeclaration
Swift
public struct Trie<Key, Value> : Sendable where Key : Collection, Key : Sendable, Value : Sendable, Key.Element : Hashable, Key.Element : Sendableextension Trie: CustomStringConvertibleextension Trie: Equatable where Value: Equatableextension Trie: Hashable where Value: Hashable -
A part of a trie.
See moreDeclaration
Swift
public struct SubTrie<Key, Value> : Sendable where Key : Collection, Key : Sendable, Value : Sendable, Key.Element : Hashable, Key.Element : Sendableextension SubTrie: CustomStringConvertible -
An unsigned integer with an arbitrary, but fixed, bit width.
See moreDeclaration
Swift
public struct WideUInt : Sendableextension WideUInt: Hashableextension WideUInt: Comparableextension WideUInt: Numeric, AdditiveArithmeticextension WideUInt: CustomStringConvertible
View on GitHub
Structures Reference