-
Notifications
You must be signed in to change notification settings - Fork 1
AnyPattern
kareman edited this page Aug 23, 2020
·
5 revisions
A type erased wrapper around a pattern. Can be used to store patterns in arrays and non-generic variables.
public struct AnyPattern<Input: BidirectionalCollection>: Pattern where Input.Element: HashableExpressibleByExtendedGraphemeClusterLiteral, ExpressibleByStringInterpolation, ExpressibleByStringLiteral, ExpressibleByUnicodeScalarLiteral, Pattern
public init<P: Pattern>(_ p: P) where Input == P.Input@inlinable public init(_ p: AnyPattern)public init(_ p: Literal<Input>)let _instructions: (inout ContiguousArray<Instruction<Input>>) throws -> Voidlet _description: () -> Stringvar description: StringThe wrapped pattern. If you know the exact type you can unwrap it again.
let wrapped: Any@inlinable public func createInstructions(_ instructions: inout ContiguousArray<Instruction<Input>>) throwspublic static func ==(lhs: AnyPattern, rhs: AnyPattern) -> BoolGenerated at 2020-08-23T12:56:49+0000 using swift-doc 1.0.0-beta.3.