The Swift standard library, end to end

Where does Swift begin and end? The honest answer is mechanical: everything you can write without a single import line. That is three modules, and this page lists all of them — 451 types, 6842 members and 287 global functions and operators, grouped by what they are for.

Swift
The standard library itself: numbers, strings, collections, protocols.
366 types · 5737 members
_Concurrency
Tasks, actors, async sequences, clocks.
72 types · 829 members
_StringProcessing
Regex literals and the matching engine's surface.
13 types · 276 members
Numbers & math 134Text & Unicode 52Collections 30Sequences & iteration 57Optionals & errors 10Ranges & strides 13Concurrency 74Memory & pointers 26Reflection & key paths 16Core protocols 25Regular expressions 9Ownership & moves 2C interoperability 3Global functions & operators 287

Numbers & math

Integers, floating-point, and the protocol stack that defines what a number is.

134 types · 3179 members
protocolAdditiveArithmetic9
protocolBinaryFloatingPoint14
protocolBinaryInteger50
structBool14
protocolComparable12
structDouble65
structDouble.SIMD16Storage2
structDouble.SIMD2Storage2
structDouble.SIMD32Storage2
structDouble.SIMD4Storage2
structDouble.SIMD64Storage2
structDouble.SIMD8Storage2
protocolDurationProtocol7
protocolFixedWidthInteger45
structFloat65
structFloat.SIMD16Storage2
structFloat.SIMD2Storage2
structFloat.SIMD32Storage2
structFloat.SIMD4Storage2
structFloat.SIMD64Storage2
structFloat.SIMD8Storage2
structFloat1663
structFloat16.SIMD16Storage2
structFloat16.SIMD2Storage2
structFloat16.SIMD32Storage2
structFloat16.SIMD4Storage2
structFloat16.SIMD64Storage2
structFloat16.SIMD8Storage2
protocolFloatingPoint72
enumFloatingPointClassification13
enumFloatingPointRoundingRule9
enumFloatingPointSign7
structInt53
structInt.SIMD16Storage2
structInt.SIMD2Storage2
structInt.SIMD32Storage2
structInt.SIMD4Storage2
structInt.SIMD64Storage2
structInt.SIMD8Storage2
structInt.Words11
structInt12843
structInt1650
structInt16.SIMD16Storage2
structInt16.SIMD2Storage2
structInt16.SIMD32Storage2
structInt16.SIMD4Storage2
structInt16.SIMD64Storage2
structInt16.SIMD8Storage2
structInt16.Words11
structInt3250
structInt32.SIMD16Storage2
structInt32.SIMD2Storage2
structInt32.SIMD32Storage2
structInt32.SIMD4Storage2
structInt32.SIMD64Storage2
structInt32.SIMD8Storage2
structInt32.Words11
structInt6450
structInt64.SIMD16Storage2
structInt64.SIMD2Storage2
structInt64.SIMD32Storage2
structInt64.SIMD4Storage2
structInt64.SIMD64Storage2
structInt64.SIMD8Storage2
structInt64.Words11
structInt850
structInt8.SIMD16Storage2
structInt8.SIMD2Storage2
structInt8.SIMD32Storage2
structInt8.SIMD4Storage2
structInt8.SIMD64Storage2
structInt8.SIMD8Storage2
structInt8.Words11
protocolNumeric4
protocolRandomNumberGenerator3
protocolSIMD137
structSIMD16183
structSIMD2181
structSIMD3182
structSIMD32183
structSIMD4187
structSIMD64183
structSIMD8183
structSIMDMask408
protocolSIMDScalar7
protocolSIMDStorage3
protocolSignedInteger5
protocolSignedNumeric4
structStaticBigInt5
protocolStrideable11
structSystemRandomNumberGenerator1
structUInt49
structUInt.SIMD16Storage2
structUInt.SIMD2Storage2
structUInt.SIMD32Storage2
structUInt.SIMD4Storage2
structUInt.SIMD64Storage2
structUInt.SIMD8Storage2
structUInt.Words11
structUInt12841
structUInt128.Words11
structUInt1649
structUInt16.SIMD16Storage2
structUInt16.SIMD2Storage2
structUInt16.SIMD32Storage2
structUInt16.SIMD4Storage2
structUInt16.SIMD64Storage2
structUInt16.SIMD8Storage2
structUInt16.Words11
structUInt3249
structUInt32.SIMD16Storage2
structUInt32.SIMD2Storage2
structUInt32.SIMD32Storage2
structUInt32.SIMD4Storage2
structUInt32.SIMD64Storage2
structUInt32.SIMD8Storage2
structUInt32.Words11
structUInt6449
structUInt64.SIMD16Storage2
structUInt64.SIMD2Storage2
structUInt64.SIMD32Storage2
structUInt64.SIMD4Storage2
structUInt64.SIMD64Storage2
structUInt64.SIMD8Storage2
structUInt64.Words11
structUInt849
structUInt8.SIMD16Storage2
structUInt8.SIMD2Storage2
structUInt8.SIMD32Storage2
structUInt8.SIMD4Storage2
structUInt8.SIMD64Storage2
structUInt8.SIMD8Storage2
structUInt8.Words11
protocolUnsignedInteger5

Text & Unicode

Strings are collections of characters, characters are collections of scalars — and every layer is here.

52 types · 610 members
structCharacter36
protocolCustomDebugStringConvertible1
protocolCustomStringConvertible1
structDefaultStringInterpolation14
protocolExpressibleByExtendedGraphemeClusterLiteral1
protocolExpressibleByStringInterpolation1
protocolExpressibleByStringLiteral1
protocolExpressibleByUnicodeScalarLiteral1
protocolLosslessStringConvertible0
structStaticString12
structString67
structString.Index11
structString.Iterator2
structString.UTF16View18
structString.UTF16View.Iterator2
structString.UTF8View20
structString.UnicodeScalarView21
structString.UnicodeScalarView.Iterator2
protocolStringInterpolationProtocol2
protocolStringProtocol24
structSubstring41
structSubstring.UTF16View16
structSubstring.UTF8View18
structSubstring.UnicodeScalarView17
protocolTextOutputStream1
protocolTextOutputStreamable1
structUTF8Span15
structUTF8Span.CharacterIterator13
structUTF8Span.UnicodeScalarIterator12
enumUnicode3
enumUnicode.ASCII9
structUnicode.ASCII.Parser2
structUnicode.CanonicalCombiningClass26
enumUnicode.GeneralCategory33
enumUnicode.NumericType6
enumUnicode.ParseResult3
structUnicode.Scalar16
structUnicode.Scalar.Properties58
structUnicode.Scalar.UTF16View7
structUnicode.Scalar.UTF8View7
enumUnicode.UTF1617
structUnicode.UTF16.ForwardParser1
structUnicode.UTF16.ReverseParser1
enumUnicode.UTF3214
structUnicode.UTF32.Parser2
enumUnicode.UTF812
structUnicode.UTF8.ForwardParser1
structUnicode.UTF8.ReverseParser1
structUnicode.UTF8.ValidationError6
structUnicode.UTF8.ValidationError.Kind8
protocolUnicodeCodec2
enumUnicodeDecodingResult4

Collections

The concrete containers: arrays, dictionaries, sets and their slices and views.

30 types · 512 members
structArray42
structArraySlice38
structCollectionDifference18
enumCollectionDifference.Change6
structCollectionDifference.Index4
structCollectionOfOne16
structCollectionOfOne.Iterator1
structContiguousArray40
structDictionary35
structDictionary.Index4
structDictionary.Iterator3
structDictionary.Keys16
structDictionary.Keys.Iterator2
structDictionary.Values14
structDictionary.Values.Iterator2
structDiscontiguousSlice17
structDiscontiguousSlice.Index6
structEmptyCollection15
structEmptyCollection.Iterator2
structInlineArray14
structKeyValuePairs10
protocolOptionSet12
structRangeSet24
structRangeSet.Ranges12
structRepeated8
structSet55
structSet.Index4
structSet.Iterator2
protocolSetAlgebra25
structSlice65

Sequences & iteration

The protocols every container conforms to, and the lazy wrappers built on them.

57 types · 572 members
structAnyBidirectionalCollection27
structAnyCollection25
structAnyIndex2
structAnyIterator2
structAnyRandomAccessCollection27
structAnySequence12
protocolBidirectionalCollection42
structBorrowingIteratorAdapter2
protocolBorrowingIteratorProtocol5
protocolBorrowingSequence5
protocolCollection61
structDefaultIndices15
structDropFirstSequence5
structDropWhileSequence3
structDropWhileSequence.Iterator2
structEnumeratedSequence13
structEnumeratedSequence.Index3
structEnumeratedSequence.Iterator3
extensionFlattenCollection13
structFlattenSequence2
structFlattenSequence.Index4
structFlattenSequence.Iterator3
structIndexingIterator4
protocolIteratorProtocol2
structIteratorSequence3
structJoinedSequence2
structJoinedSequence.Iterator2
extensionLazyCollection13
protocolLazyCollectionProtocol2
extensionLazyDropWhileCollection7
structLazyDropWhileSequence3
structLazyDropWhileSequence.Iterator2
extensionLazyFilterCollection15
structLazyFilterSequence4
structLazyFilterSequence.Iterator4
extensionLazyMapCollection16
structLazyMapSequence4
structLazyMapSequence.Iterator3
extensionLazyPrefixWhileCollection6
structLazyPrefixWhileCollection.Index0
structLazyPrefixWhileSequence3
extensionLazyPrefixWhileSequence.Index4
structLazyPrefixWhileSequence.Iterator3
structLazySequence6
protocolLazySequenceProtocol13
protocolMutableCollection17
structPrefixSequence3
structPrefixSequence.Iterator2
protocolRandomAccessCollection20
protocolRangeReplaceableCollection54
structReversedCollection13
structReversedCollection.Index5
structReversedCollection.Iterator3
protocolSequence51
structUnfoldSequence2
structZip2Sequence3
structZip2Sequence.Iterator2

Optionals & errors

Absence and failure as ordinary values.

10 types · 50 members
structCancellationError0
enumDecodingError8
structDecodingError.Context3
enumEncodingError2
structEncodingError.Context3
protocolError0
protocolExpressibleByNilLiteral0
enumNever7
enumOptional17
enumResult10

Ranges & strides

Half-open, closed, partial — and walking through them by a step.

13 types · 93 members
structClosedRange27
enumClosedRange.Index6
structPartialRangeFrom6
structPartialRangeFrom.Iterator2
structPartialRangeThrough4
structPartialRangeUpTo4
structRange29
protocolRangeExpression4
structStrideThrough4
structStrideThroughIterator1
structStrideTo4
structStrideToIterator1
enumUnboundedRange_1

Concurrency

Tasks, actors, async sequences and clocks — the `_Concurrency` module, which arrives without an import.

74 types · 845 members
protocolActor11
structAsyncCompactMapSequence8
structAsyncCompactMapSequence.Iterator6
structAsyncDropFirstSequence10
structAsyncDropFirstSequence.Iterator6
structAsyncDropWhileSequence8
structAsyncDropWhileSequence.Iterator6
structAsyncFilterSequence8
structAsyncFilterSequence.Iterator6
structAsyncFlatMapSequence8
structAsyncFlatMapSequence.Iterator6
protocolAsyncIteratorProtocol8
structAsyncMapSequence8
structAsyncMapSequence.Iterator6
structAsyncPrefixSequence8
structAsyncPrefixSequence.Iterator6
structAsyncPrefixWhileSequence8
structAsyncPrefixWhileSequence.Iterator6
protocolAsyncSequence56
structAsyncStream6
structAsyncStream.Continuation13
enumAsyncStream.Continuation.BufferingPolicy3
enumAsyncStream.Continuation.Termination5
enumAsyncStream.Continuation.YieldResult3
structAsyncStream.Iterator4
structAsyncThrowingCompactMapSequence8
structAsyncThrowingCompactMapSequence.Iterator6
structAsyncThrowingDropWhileSequence8
structAsyncThrowingDropWhileSequence.Iterator6
structAsyncThrowingFilterSequence8
structAsyncThrowingFilterSequence.Iterator6
structAsyncThrowingFlatMapSequence8
structAsyncThrowingFlatMapSequence.Iterator6
structAsyncThrowingMapSequence8
structAsyncThrowingMapSequence.Iterator6
structAsyncThrowingPrefixWhileSequence8
structAsyncThrowingPrefixWhileSequence.Iterator6
structAsyncThrowingStream6
structAsyncThrowingStream.Continuation13
enumAsyncThrowingStream.Continuation.BufferingPolicy3
enumAsyncThrowingStream.Continuation.Termination2
enumAsyncThrowingStream.Continuation.YieldResult3
structAsyncThrowingStream.Iterator4
structCheckedContinuation8
protocolClock15
structContinuousClock12
structContinuousClock.Instant28
structDiscardingTaskGroup23
structDuration29
protocolExecutor12
structExecutorJob8
protocolGlobalActor9
protocolInstantProtocol3
structJob4
structJobPriority14
actorMainActor10
protocolSendable0
protocolSendableMetatype0
protocolSerialExecutor23
structSuspendingClock12
structSuspendingClock.Instant28
structTask82
protocolTaskExecutor6
structTaskGroup42
structTaskGroup.Iterator8
classTaskLocal7
structTaskPriority27
structThrowingDiscardingTaskGroup23
structThrowingTaskGroup43
structThrowingTaskGroup.Iterator8
structUnownedJob6
structUnownedSerialExecutor1
structUnownedTaskExecutor7
structUnsafeContinuation9

Memory & pointers

Where Swift stops being safe on purpose: raw memory, buffers, manual lifetimes.

26 types · 386 members
structAutoreleasingUnsafeMutablePointer3
protocolBitwiseCopyable0
classManagedBuffer7
structManagedBufferPointer8
enumMemoryLayout7
structMutableRawSpan24
structMutableSpan25
structOpaquePointer4
structOutputRawSpan16
structOutputSpan20
structRawSpan23
structSpan21
structSpanIterator2
structUnmanaged9
structUnsafeBufferPointer26
structUnsafeBufferPointer.Iterator1
structUnsafeCurrentTask16
structUnsafeMutableBufferPointer46
structUnsafeMutablePointer22
structUnsafeMutableRawBufferPointer34
structUnsafeMutableRawPointer24
structUnsafePointer8
structUnsafeRawBufferPointer21
structUnsafeRawBufferPointer.Iterator3
structUnsafeRawPointer16
protocolUnsafeSendable0

Reflection & key paths

Looking at a value's shape at runtime, and naming a property without calling it.

16 types · 61 members
structAnyHashable7
classAnyKeyPath7
protocolCustomLeafReflectable0
protocolCustomPlaygroundDisplayConvertible1
protocolCustomReflectable1
protocolIdentifiable3
classKeyPath1
structMirror9
enumMirror.AncestorRepresentation3
enumMirror.DisplayStyle12
protocolMirrorPath0
structObjectIdentifier5
classPartialKeyPath1
classReferenceWritableKeyPath1
classWritableKeyPath1
protocol_AppendKeyPath9

Core protocols

The small vocabulary almost every Swift type opts into.

25 types · 435 members
protocolCaseIterable2
protocolCodingKey4
protocolCodingKeyRepresentable1
structCodingUserInfoKey5
protocolDecodable0
protocolDecoder5
protocolEncodable1
protocolEncoder5
protocolEquatable2
protocolExpressibleByArrayLiteral1
protocolExpressibleByBooleanLiteral1
protocolExpressibleByDictionaryLiteral2
protocolExpressibleByFloatLiteral1
protocolExpressibleByIntegerLiteral1
protocolHashable2
structHasher3
structKeyedDecodingContainer43
protocolKeyedDecodingContainerProtocol62
structKeyedEncodingContainer42
protocolKeyedEncodingContainerProtocol62
protocolRawRepresentable22
protocolSingleValueDecodingContainer23
protocolSingleValueEncodingContainer23
protocolUnkeyedDecodingContainer61
protocolUnkeyedEncodingContainer61

Regular expressions

The `_StringProcessing` module: literals, builders and match output.

9 types · 95 members
structAnyRegexOutput20
structAnyRegexOutput.Element10
protocolCustomConsumingRegexComponent3
structRegex37
structRegex.Match4
protocolRegexComponent2
structRegexRepetitionBehavior9
structRegexSemanticLevel5
structRegexWordBoundaryKind5

Ownership & moves

The newest layer of the language: what can be copied, escaped, or consumed.

2 types · 0 members
protocolCopyable0
protocolEscapable0

C interoperability

The types that exist so Swift can talk to C.

3 types · 4 members
structCVaListPointer1
protocolCVarArg0
enumCommandLine3

Global functions & operators

Not attached to any type: the free functions and operator declarations that are in scope in every Swift file.

287 declarations
public let globalConcurrentExecutor: any TaskExecutor { get }
public let globalConcurrentExecutor: any TaskExecutor { get }
public var globalConcurrentExecutor: any TaskExecutor { get }
public var globalConcurrentExecutor: any TaskExecutor { get }
public func != (t0: (any (~Copyable & ~Escapable).Type)?, t1: (any (~Copyable & ~Escapable).Type)?) -> Bool
@inlinable public func != <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
@inlinable public func != <T>(lhs: T, rhs: T) -> Bool where T : Equatable, T : RawRepresentable, T.RawValue : Equatable
@inlinable public func != (lhs: (), rhs: ()) -> Bool
@inlinable public func != <A, B>(lhs: (A, B), rhs: (A, B)) -> Bool where A : Equatable, B : Equatable
@inlinable public func != <A, B, C>(lhs: (A, B, C), rhs: (A, B, C)) -> Bool where A : Equatable, B : Equatable, C : Equatable
@inlinable public func != <A, B, C, D>(lhs: (A, B, C, D), rhs: (A, B, C, D)) -> Bool where A : Equatable, B : Equatable, C : Equatable, D : Equatable
@inlinable public func != <A, B, C, D, E>(lhs: (A, B, C, D, E), rhs: (A, B, C, D, E)) -> Bool where A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable
@inlinable public func != <A, B, C, D, E, F>(lhs: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F)) -> Bool where A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable, F : Equatable
@inlinable public func !== (lhs: AnyObject?, rhs: AnyObject?) -> Bool
@inlinable public func < (lhs: (), rhs: ()) -> Bool
@inlinable public func < <A, B, C, D, E, F>(lhs: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable, E : Comparable, F : Comparable
@inlinable public func < <A, B, C, D, E>(lhs: (A, B, C, D, E), rhs: (A, B, C, D, E)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable, E : Comparable
@inlinable public func < <A, B, C, D>(lhs: (A, B, C, D), rhs: (A, B, C, D)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable
@inlinable public func < <A, B, C>(lhs: (A, B, C), rhs: (A, B, C)) -> Bool where A : Comparable, B : Comparable, C : Comparable
@inlinable public func < <A, B>(lhs: (A, B), rhs: (A, B)) -> Bool where A : Comparable, B : Comparable
@inlinable public func <= (lhs: (), rhs: ()) -> Bool
@inlinable public func <= <A, B, C, D, E, F>(lhs: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable, E : Comparable, F : Comparable
@inlinable public func <= <A, B, C, D, E>(lhs: (A, B, C, D, E), rhs: (A, B, C, D, E)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable, E : Comparable
@inlinable public func <= <A, B, C, D>(lhs: (A, B, C, D), rhs: (A, B, C, D)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable
@inlinable public func <= <A, B, C>(lhs: (A, B, C), rhs: (A, B, C)) -> Bool where A : Comparable, B : Comparable, C : Comparable
@inlinable public func <= <A, B>(lhs: (A, B), rhs: (A, B)) -> Bool where A : Comparable, B : Comparable
public func == (t0: (any (~Copyable & ~Escapable).Type)?, t1: (any (~Copyable & ~Escapable).Type)?) -> Bool
@inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
@inlinable public func == (lhs: (), rhs: ()) -> Bool
@inlinable public func == <A, B>(lhs: (A, B), rhs: (A, B)) -> Bool where A : Equatable, B : Equatable
@inlinable public func == <A, B, C>(lhs: (A, B, C), rhs: (A, B, C)) -> Bool where A : Equatable, B : Equatable, C : Equatable
@inlinable public func == <A, B, C, D>(lhs: (A, B, C, D), rhs: (A, B, C, D)) -> Bool where A : Equatable, B : Equatable, C : Equatable, D : Equatable
@inlinable public func == <A, B, C, D, E>(lhs: (A, B, C, D, E), rhs: (A, B, C, D, E)) -> Bool where A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable
@inlinable public func == <A, B, C, D, E, F>(lhs: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F)) -> Bool where A : Equatable, B : Equatable, C : Equatable, D : Equatable, E : Equatable, F : Equatable
@inlinable public func === (lhs: AnyObject?, rhs: AnyObject?) -> Bool
@inlinable public func > (lhs: (), rhs: ()) -> Bool
@inlinable public func > <A, B>(lhs: (A, B), rhs: (A, B)) -> Bool where A : Comparable, B : Comparable
@inlinable public func > <A, B, C>(lhs: (A, B, C), rhs: (A, B, C)) -> Bool where A : Comparable, B : Comparable, C : Comparable
@inlinable public func > <A, B, C, D>(lhs: (A, B, C, D), rhs: (A, B, C, D)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable
@inlinable public func > <A, B, C, D, E>(lhs: (A, B, C, D, E), rhs: (A, B, C, D, E)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable, E : Comparable
@inlinable public func > <A, B, C, D, E, F>(lhs: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable, E : Comparable, F : Comparable
@inlinable public func >= (lhs: (), rhs: ()) -> Bool
@inlinable public func >= <A, B>(lhs: (A, B), rhs: (A, B)) -> Bool where A : Comparable, B : Comparable
@inlinable public func >= <A, B, C>(lhs: (A, B, C), rhs: (A, B, C)) -> Bool where A : Comparable, B : Comparable, C : Comparable
@inlinable public func >= <A, B, C, D>(lhs: (A, B, C, D), rhs: (A, B, C, D)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable
@inlinable public func >= <A, B, C, D, E>(lhs: (A, B, C, D, E), rhs: (A, B, C, D, E)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable, E : Comparable
@inlinable public func >= <A, B, C, D, E, F>(lhs: (A, B, C, D, E, F), rhs: (A, B, C, D, E, F)) -> Bool where A : Comparable, B : Comparable, C : Comparable, D : Comparable, E : Comparable, F : Comparable
public func ?? <T>(optional: consuming T?, defaultValue: @autoclosure () throws -> T) rethrows -> T where T : ~Copyable
public func ?? <T>(optional: consuming T?, defaultValue: @autoclosure () throws -> T?) rethrows -> T? where T : ~Copyable
@inlinable public func abs<T>(_ x: T) -> T where T : Comparable, T : SignedNumeric
public func all<Storage>(_ mask: SIMDMask<Storage>) -> Bool where Storage : SIMD, Storage.Scalar : FixedWidthInteger, Storage.Scalar : SignedInteger
public func any<Storage>(_ mask: SIMDMask<Storage>) -> Bool where Storage : SIMD, Storage.Scalar : FixedWidthInteger, Storage.Scalar : SignedInteger
public func assert(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line)
public func assertionFailure(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line)
public func async<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async throws -> Success) -> Task<Success, any Error> where Success : Sendable
public func async<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async -> Success) -> Task<Success, Never> where Success : Sendable
public func async<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async -> Success) -> Task<Success, Never> where Success : Sendable
public func async<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async throws -> Success) -> Task<Success, any Error> where Success : Sendable
public func asyncDetached<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async -> Success) -> Task<Success, Never> where Success : Sendable
public func asyncDetached<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async throws -> Success) -> Task<Success, any Error> where Success : Sendable
public func asyncDetached<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async -> Success) -> Task<Success, Never> where Success : Sendable
public func asyncDetached<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async throws -> Success) -> Task<Success, any Error> where Success : Sendable
public func debugPrint(_ items: Any..., separator: String = " ", terminator: String = "\n")
public func debugPrint<Target>(_ items: Any..., separator: String = " ", terminator: String = "\n", to output: inout Target) where Target : TextOutputStream
public func detach<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async -> Success) -> Task<Success, Never> where Success : Sendable
public func detach<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async throws -> Success) -> Task<Success, any Error> where Success : Sendable
public func detach<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async -> Success) -> Task<Success, Never> where Success : Sendable
public func detach<Success>(priority: TaskPriority? = nil, operation: @escaping @isolated(any) @Sendable () async throws -> Success) -> Task<Success, any Error> where Success : Sendable
public func dump<T, TargetStream>(_ value: T, to target: inout TargetStream, name: String? = nil, indent: Int = 0, maxDepth: Int = .max, maxItems: Int = .max) -> T where TargetStream : TextOutputStream
public func dump<T>(_ value: T, name: String? = nil, indent: Int = 0, maxDepth: Int = .max, maxItems: Int = .max) -> T
public func exchange<T>(_ item: inout T, with newValue: consuming T) -> T where T : ~Copyable
public func extendLifetime<T>(_ x: borrowing T) where T : ~Copyable, T : ~Escapable
public func extractIsolation<each Arg, Result>(_ fn: @escaping @isolated(any) (repeat each Arg) async throws -> Result) -> (any Actor)?
public func extractIsolation<each Arg, Result>(_ fn: @escaping @isolated(any) (repeat each Arg) async throws -> Result) -> (any Actor)?
public func fatalError(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) -> Never
@inlinable public func getVaList(_ args: [any CVarArg]) -> CVaListPointer
@inlinable public func isKnownUniquelyReferenced<T>(_ object: inout T) -> Bool where T : AnyObject
@inlinable public func isKnownUniquelyReferenced<T>(_ object: inout T?) -> Bool where T : AnyObject
@inlinable public func max<T>(_ x: T, _ y: T) -> T where T : Comparable
@inlinable public func max<T>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T where T : Comparable
@inlinable public func min<T>(_ x: T, _ y: T) -> T where T : Comparable
@inlinable public func min<T>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T where T : Comparable
@inlinable public func numericCast<T, U>(_ x: T) -> U where T : BinaryInteger, U : BinaryInteger
public func pointwiseMax<T>(_ a: T, _ b: T) -> T where T : SIMD, T.Scalar : Comparable
public func pointwiseMax<T>(_ a: T, _ b: T) -> T where T : SIMD, T.Scalar : FloatingPoint
public func pointwiseMin<T>(_ a: T, _ b: T) -> T where T : SIMD, T.Scalar : Comparable
public func pointwiseMin<T>(_ a: T, _ b: T) -> T where T : SIMD, T.Scalar : FloatingPoint
public func precondition(_ condition: @autoclosure () -> Bool, _ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line)
public func preconditionFailure(_ message: @autoclosure () -> String = String(), file: StaticString = #file, line: UInt = #line) -> Never
public func print(_ items: Any..., separator: String = " ", terminator: String = "\n")
public func print<Target>(_ items: Any..., separator: String = " ", terminator: String = "\n", to output: inout Target) where Target : TextOutputStream
public func readLine(strippingNewline: Bool = true) -> String?
@inlinable public func repeatElement<T>(_ element: T, count n: Int) -> Repeated<T>
@inlinable public func sequence<T>(first: T, next: @escaping (T) -> T?) -> UnfoldFirstSequence<T>
@inlinable public func sequence<T, State>(state: State, next: @escaping (inout State) -> T?) -> UnfoldSequence<T, State>
@inlinable public func stride<T>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> where T : Strideable
@inlinable public func stride<T>(from start: T, through end: T, by stride: T.Stride) -> StrideThrough<T> where T : Strideable
@inlinable public func swap<T>(_ a: inout T, _ b: inout T) where T : ~Copyable
@inlinable public func transcode<Input, InputEncoding, OutputEncoding>(_ input: Input, from inputEncoding: InputEncoding.Type, to outputEncoding: OutputEncoding.Type, stoppingOnError stopOnError: Bool, into processCodeUnit: (OutputEncoding.CodeUnit) -> Void) -> Bool where Input : IteratorProtocol, InputEncoding : _UnicodeEncoding, OutputEncoding : _UnicodeEncoding, Input.Element == InputEncoding.CodeUnit
public func type<T, Metatype>(of value: borrowing T) -> Metatype where T : ~Copyable, T : ~Escapable
@inlinable public func unsafeBitCast<T, U>(_ x: T, to type: U.Type) -> U
public func unsafeDowncast<T>(_ x: AnyObject, to type: T.Type) -> T where T : AnyObject
@inlinable public func withCheckedContinuation<T>(isolation: isolated (any Actor)?, function: String = #function, _ body: (CheckedContinuation<T, Never>) -> Void) async -> sending T
@inlinable public func withCheckedContinuation<T>(isolation: isolated (any Actor)? = #isolation, function: String = #function, _ body: (CheckedContinuation<T, Never>) -> Void) async -> sending T
@inlinable public func withCheckedThrowingContinuation<T>(isolation: isolated (any Actor)?, function: String = #function, _ body: (CheckedContinuation<T, any Error>) -> Void) async throws -> sending T
@inlinable public func withCheckedThrowingContinuation<T>(isolation: isolated (any Actor)? = #isolation, function: String = #function, _ body: (CheckedContinuation<T, any Error>) -> Void) async throws -> sending T
@inlinable public func withDiscardingTaskGroup<GroupResult>(returning returnType: GroupResult.Type = GroupResult.self, isolation: isolated (any Actor)? = #isolation, body: (inout DiscardingTaskGroup) async -> GroupResult) async -> GroupResult
@inlinable public func withDiscardingTaskGroup<GroupResult>(returning returnType: GroupResult.Type = GroupResult.self, isolation: isolated (any Actor)? = #isolation, body: (inout DiscardingTaskGroup) async -> GroupResult) async -> GroupResult
public func withExtendedLifetime<T, E, Result>(_ x: borrowing T, _ body: () throws(E) -> Result) throws(E) -> Result where E : Error, T : ~Copyable, T : ~Escapable, Result : ~Copyable
public func withExtendedLifetime<T, E, Result>(_ x: borrowing T, _ body: (borrowing T) throws(E) -> Result) throws(E) -> Result where E : Error, T : ~Copyable, T : ~Escapable, Result : ~Copyable
public func withTaskCancellationHandler<T>(handler: @Sendable () -> Void, operation: () async throws -> T) async rethrows -> T
public func withTaskCancellationHandler<T>(operation: () async throws -> T, onCancel handler: @Sendable () -> Void, isolation: isolated (any Actor)?) async rethrows -> T
public func withTaskCancellationHandler<T>(handler: @Sendable () -> Void, operation: () async throws -> T) async rethrows -> T
public func withTaskCancellationHandler<T>(operation: () async throws -> T, onCancel handler: @Sendable () -> Void, isolation: isolated (any Actor)? = #isolation) async rethrows -> T
public func withTaskCancellationShield<Value, Failure>(operation: () throws(Failure) -> Value) throws(Failure) -> Value where Failure : Error
public func withTaskExecutorPreference<T, Failure>(_ taskExecutor: (any TaskExecutor)?, isolation: isolated (any Actor)? = #isolation, operation: () async throws(Failure) -> T) async throws(Failure) -> T where Failure : Error
public func withTaskExecutorPreference<T, Failure>(_ taskExecutor: (any TaskExecutor)?, isolation: isolated (any Actor)? = #isolation, operation: () async throws(Failure) -> T) async throws(Failure) -> T where Failure : Error
@inlinable public func withTaskGroup<ChildTaskResult, GroupResult>(of childTaskResultType: ChildTaskResult.Type = ChildTaskResult.self, returning returnType: GroupResult.Type = GroupResult.self, isolation: isolated (any Actor)? = #isolation, body: (inout TaskGroup<ChildTaskResult>) async -> GroupResult) async -> GroupResult where ChildTaskResult : Sendable
@inlinable public func withTaskGroup<ChildTaskResult, GroupResult>(of childTaskResultType: ChildTaskResult.Type = ChildTaskResult.self, returning returnType: GroupResult.Type = GroupResult.self, isolation: isolated (any Actor)? = #isolation, body: (inout TaskGroup<ChildTaskResult>) async -> GroupResult) async -> GroupResult where ChildTaskResult : Sendable
@inlinable public func withThrowingDiscardingTaskGroup<GroupResult>(returning returnType: GroupResult.Type = GroupResult.self, isolation: isolated (any Actor)? = #isolation, body: (inout ThrowingDiscardingTaskGroup<any Error>) async throws -> GroupResult) async throws -> GroupResult
@inlinable public func withThrowingDiscardingTaskGroup<GroupResult>(returning returnType: GroupResult.Type = GroupResult.self, isolation: isolated (any Actor)? = #isolation, body: (inout ThrowingDiscardingTaskGroup<any Error>) async throws -> GroupResult) async throws -> GroupResult
@inlinable public func withThrowingTaskGroup<ChildTaskResult, GroupResult>(of childTaskResultType: ChildTaskResult.Type = ChildTaskResult.self, returning returnType: GroupResult.Type = GroupResult.self, isolation: isolated (any Actor)? = #isolation, body: (inout ThrowingTaskGroup<ChildTaskResult, any Error>) async throws -> GroupResult) async rethrows -> GroupResult where ChildTaskResult : Sendable
@inlinable public func withThrowingTaskGroup<ChildTaskResult, GroupResult>(of childTaskResultType: ChildTaskResult.Type = ChildTaskResult.self, returning returnType: GroupResult.Type = GroupResult.self, isolation: isolated (any Actor)? = #isolation, body: (inout ThrowingTaskGroup<ChildTaskResult, any Error>) async throws -> GroupResult) async rethrows -> GroupResult where ChildTaskResult : Sendable
public func withUnsafeBytes<T, E, Result>(of value: inout T, _ body: (UnsafeRawBufferPointer) throws(E) -> Result) throws(E) -> Result where E : Error, T : ~Copyable, Result : ~Copyable
public func withUnsafeBytes<T, E, Result>(of value: borrowing T, _ body: (UnsafeRawBufferPointer) throws(E) -> Result) throws(E) -> Result where E : Error, T : ~Copyable, Result : ~Copyable
public func withUnsafeContinuation<T>(isolation: isolated (any Actor)?, _ fn: (UnsafeContinuation<T, Never>) -> Void) async -> sending T
public func withUnsafeContinuation<T>(isolation: isolated (any Actor)? = #isolation, _ fn: (UnsafeContinuation<T, Never>) -> Void) async -> sending T
public func withUnsafeCurrentTask<T>(body: (UnsafeCurrentTask?) throws -> T) rethrows -> T
public func withUnsafeCurrentTask<T>(body: (UnsafeCurrentTask?) async throws -> T) async rethrows -> T
public func withUnsafeCurrentTask<T>(body: (UnsafeCurrentTask?) throws -> T) rethrows -> T
public func withUnsafeCurrentTask<T>(body: (UnsafeCurrentTask?) async throws -> T) async rethrows -> T
public func withUnsafeMutableBytes<T, E, Result>(of value: inout T, _ body: (UnsafeMutableRawBufferPointer) throws(E) -> Result) throws(E) -> Result where E : Error, T : ~Copyable, Result : ~Copyable
public func withUnsafeMutablePointer<T, E, Result>(to value: inout T, _ body: (UnsafeMutablePointer<T>) throws(E) -> Result) throws(E) -> Result where E : Error, T : ~Copyable, Result : ~Copyable
public func withUnsafePointer<T, E, Result>(to value: borrowing T, _ body: (UnsafePointer<T>) throws(E) -> Result) throws(E) -> Result where E : Error, T : ~Copyable, Result : ~Copyable
public func withUnsafePointer<T, E, Result>(to value: inout T, _ body: (UnsafePointer<T>) throws(E) -> Result) throws(E) -> Result where E : Error, T : ~Copyable, Result : ~Copyable
public func withUnsafeTemporaryAllocation<R, E>(byteCount: Int, alignment: Int, _ body: (UnsafeMutableRawBufferPointer) throws(E) -> R) throws(E) -> R where E : Error, R : ~Copyable
public func withUnsafeTemporaryAllocation<T, R, E>(of type: T.Type, capacity: Int, _ body: (UnsafeMutableBufferPointer<T>) throws(E) -> R) throws(E) -> R where E : Error, T : ~Copyable, R : ~Copyable
public func withUnsafeThrowingContinuation<T>(isolation: isolated (any Actor)?, _ fn: (UnsafeContinuation<T, any Error>) -> Void) async throws -> sending T
public func withUnsafeThrowingContinuation<T>(isolation: isolated (any Actor)? = #isolation, _ fn: (UnsafeContinuation<T, any Error>) -> Void) async throws -> sending T
@inlinable public func withVaList<R>(_ args: [any CVarArg], _ body: (CVaListPointer) -> R) -> R
public func withoutActuallyEscaping<ClosureType, ResultType, Failure>(_ closure: ClosureType, do body: (_ escapingClosure: ClosureType) throws(Failure) -> ResultType) throws(Failure) -> ResultType where Failure : Error
@inlinable public func zip<Sequence1, Sequence2>(_ sequence1: Sequence1, _ sequence2: Sequence2) -> Zip2Sequence<Sequence1, Sequence2> where Sequence1 : Sequence, Sequence2 : Sequence
public func ~= <T>(a: T, b: T) -> Bool where T : Equatable
public typealias AnyActor = AnyObject & Sendable
public typealias AnyActor = AnyObject & Sendable
public typealias AnyClass = any AnyObject.Type
public typealias AnyObject
public typealias BooleanLiteralType = Bool
public typealias CBool = Bool
public typealias CChar = Int8
public typealias CChar16 = UInt16
public typealias CChar32 = Unicode.Scalar
public typealias CChar8 = UInt8
public typealias CDouble = Double
public typealias CFloat = Float
public typealias CFloat16 = Float16
public typealias CInt = Int32
public typealias CLong = Int
public typealias CLongDouble = Double
public typealias CLongLong = Int64
public typealias CShort = Int16
public typealias CSignedChar = Int8
public typealias CUnsignedChar = UInt8
public typealias CUnsignedInt = UInt32
public typealias CUnsignedLong = UInt
public typealias CUnsignedLongLong = UInt64
public typealias CUnsignedShort = UInt16
public typealias CWideChar = Unicode.Scalar
public typealias Codable = Decodable & Encodable
public typealias ConcurrentValue = Sendable
public typealias CountableClosedRange<Bound> = ClosedRange<Bound> where Bound : Strideable, Bound.Stride : SignedInteger
public typealias CountablePartialRangeFrom<Bound> = PartialRangeFrom<Bound> where Bound : Strideable, Bound.Stride : SignedInteger
public typealias CountableRange<Bound> = Range<Bound> where Bound : Strideable, Bound.Stride : SignedInteger
public typealias DictionaryIndex<Key, Value> = Dictionary<Key, Value>.Index where Key : Hashable
public typealias DictionaryIterator<Key, Value> = Dictionary<Key, Value>.Iterator where Key : Hashable
public typealias DictionaryLiteral<Key, Value> = KeyValuePairs<Key, Value>
public typealias EnumeratedIterator<T> = EnumeratedSequence<T>.Iterator where T : Sequence
public typealias ExtendedGraphemeClusterType = String
public typealias FlattenCollection<T> = FlattenSequence<T> where T : Collection, T.Element : Collection
public typealias Float32 = Float
public typealias Float64 = Double
public typealias FloatLiteralType = Double
public typealias IntegerLiteralType = Int
public typealias LazyCollection<T> = LazySequence<T> where T : Collection
public typealias LazyDropWhileCollection<T> = LazyDropWhileSequence<T> where T : Collection
public typealias LazyFilterCollection<T> = LazyFilterSequence<T> where T : Collection
public typealias LazyMapCollection<T, U> = LazyMapSequence<T, U> where T : Collection
public typealias LazyPrefixWhileCollection<T> = LazyPrefixWhileSequence<T> where T : Collection
public typealias PartialAsyncTask = UnownedJob
public typealias PartialAsyncTask = UnownedJob
public typealias PlaygroundQuickLook
public typealias SetIndex<Element> = Set<Element>.Index where Element : Hashable
public typealias SetIterator<Element> = Set<Element>.Iterator where Element : Hashable
public typealias StringLiteralType = String
public typealias UTF16 = Unicode.UTF16
public typealias UTF32 = Unicode.UTF32
public typealias UTF8 = Unicode.UTF8
public typealias UnboundedRange = (UnboundedRange_) -> ()
public typealias UnfoldFirstSequence<T> = UnfoldSequence<T, (T?, Bool)>
public typealias UnicodeScalar = Unicode.Scalar
public typealias UnicodeScalarType = String
public typealias UnsafeConcurrentValue = UnsafeSendable
public typealias UnsafeThrowingContinuation<T> = UnsafeContinuation<T, any Error>
public typealias UnsafeThrowingContinuation<T> = UnsafeContinuation<T, any Error>
public typealias Void = ()
prefix operator !
infix operator != : ComparisonPrecedence
infix operator !== : ComparisonPrecedence
infix operator % : MultiplicationPrecedence
infix operator %= : AssignmentPrecedence
infix operator & : MultiplicationPrecedence
infix operator && : LogicalConjunctionPrecedence
infix operator &* : MultiplicationPrecedence
infix operator &*= : AssignmentPrecedence
infix operator &+ : AdditionPrecedence
infix operator &+= : AssignmentPrecedence
infix operator &- : AdditionPrecedence
infix operator &-= : AssignmentPrecedence
infix operator &<< : BitwiseShiftPrecedence
infix operator &<<= : AssignmentPrecedence
infix operator &= : AssignmentPrecedence
infix operator &>> : BitwiseShiftPrecedence
infix operator &>>= : AssignmentPrecedence
infix operator * : MultiplicationPrecedence
infix operator *= : AssignmentPrecedence
prefix operator +
infix operator + : AdditionPrecedence
prefix operator ++
postfix operator ++
infix operator += : AssignmentPrecedence
prefix operator -
infix operator - : AdditionPrecedence
prefix operator --
postfix operator --
infix operator -= : AssignmentPrecedence
prefix operator .!
infix operator .!= : ComparisonPrecedence
infix operator .& : LogicalConjunctionPrecedence
infix operator .&= : AssignmentPrecedence
prefix operator ...
postfix operator ...
infix operator ... : RangeFormationPrecedence
prefix operator ..<
infix operator ..< : RangeFormationPrecedence
infix operator .< : ComparisonPrecedence
infix operator .<= : ComparisonPrecedence
infix operator .== : ComparisonPrecedence
infix operator .> : ComparisonPrecedence
infix operator .>= : ComparisonPrecedence
infix operator .^ : LogicalDisjunctionPrecedence
infix operator .^= : AssignmentPrecedence
infix operator .| : LogicalDisjunctionPrecedence
infix operator .|= : AssignmentPrecedence
infix operator / : MultiplicationPrecedence
infix operator /= : AssignmentPrecedence
infix operator < : ComparisonPrecedence
infix operator << : BitwiseShiftPrecedence
infix operator <<= : AssignmentPrecedence
infix operator <= : ComparisonPrecedence
infix operator == : ComparisonPrecedence
infix operator === : ComparisonPrecedence
infix operator > : ComparisonPrecedence
infix operator >= : ComparisonPrecedence
infix operator >> : BitwiseShiftPrecedence
infix operator >>= : AssignmentPrecedence
infix operator ?? : NilCoalescingPrecedence
infix operator ^ : AdditionPrecedence
infix operator ^= : AssignmentPrecedence
infix operator | : AdditionPrecedence
infix operator |= : AssignmentPrecedence
infix operator || : LogicalDisjunctionPrecedence
prefix operator ~
infix operator ~= : ComparisonPrecedence
infix operator ~> : DefaultPrecedence
precedencegroup AdditionPrecedence
precedencegroup AssignmentPrecedence
precedencegroup BitwiseShiftPrecedence
precedencegroup CastingPrecedence
precedencegroup ComparisonPrecedence
precedencegroup DefaultPrecedence
precedencegroup FunctionArrowPrecedence
precedencegroup LogicalConjunctionPrecedence
precedencegroup LogicalDisjunctionPrecedence
precedencegroup MultiplicationPrecedence
precedencegroup NilCoalescingPrecedence
precedencegroup RangeFormationPrecedence
precedencegroup TernaryPrecedence

Extracted from Apple's own .swiftinterface for Swift 6.4 — the declarations the compiler itself reads — and regrouped by hand into the categories above, because the interface has no categories of its own. Types whose only job is to satisfy a protocol requirement (SIMD8Storage, Int.Words and the underscored ones) are hidden until you ask for them.

Generated by tools/stdlib-inventory/ · 2026-09-23