Never (ext)
You’re viewing third-party extensions to Never
, an enum from the Swift standard library.
You can also read the documentation forNever
itself.
extension Never
You’re viewing third-party extensions to Never
, an enum from the Swift standard library.
You can also read the documentation forNever
itself.
extension Never
@frozen enum Never
A type that has no values and can’t be constructed.
import CasePathsCore
Case paths bring the power and ergonomics of key paths to enums.
protocol CasePathIterable : CasePathable where Self.AllCasePaths : Sequence, Self.AllCasePaths.Element == PartialKeyPath<Case<Self>>
A type that provides a collection of all of its case paths.
protocol CasePathable
A type that provides a collection of all of its case paths.
static var allCasePaths: AllCasePaths { get }
struct AllCasePaths
subscript(case keyPath: PartialCaseKeyPath<Self>) -> Any? { get }
Attempts to extract the associated value from a root enum using a partial case key path.
subscript<Value>(dynamicMember keyPath: KeyPath<Self.AllCasePaths, AnyCasePath<Self, Value>>) -> Value? { get set }
Extracts the associated value of a case via dynamic member lookup.
subscript<Value>(dynamicMember keyPath: KeyPath<Self.AllCasePaths, AnyCasePath<Self, Value>>) -> Value { get set }
Embeds the associated value of a case via dynamic member lookup.
func `is`(_ keyPath: PartialCaseKeyPath<Self>) -> Bool
Tests the associated value of a case.
mutating func modify<Value>(_ keyPath: CaseKeyPath<Self, Value>, yield: (inout Value) -> Void, fileID: StaticString = #fileID, filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column)
Unwraps and yields a mutable associated value to a closure.
typealias Cases = Case<Self>
A namespace that can be used to derive case key paths from case-pathable enums.