Tag
public final class Tag
extension Tag: CustomStringConvertible
extension Tag: Hashable
Tags describe the the type of a Node.
-
Shorthand accessor for
Tag(.implicit)
.Declaration
Swift
public static var implicit: Tag { get }
-
Create a
Tag
with the specified name, resolver and constructor.Declaration
Swift
public init(_ name: Name, _ resolver: Resolver = .default, _ constructor: Constructor = .default)
Parameters
name
Tag name.
resolver
Resolver
this tag should use,.default
if omitted.constructor
Constructor
this tag should use,.default
if omitted. -
Lens returning a copy of the current
Tag
with the specified overridden changes.Note
Omitting or passing nil for a parameter will preserve the current
Tag
‘s value in the copy.Declaration
Swift
public func copy(with name: Name? = nil, resolver: Resolver? = nil, constructor: Constructor? = nil) -> Tag
Parameters
name
Overridden tag name.
resolver
Overridden resolver.
constructor
Overridden constructor.
Return Value
A copy of the current
Tag
with the specified overridden changes. -
A textual representation of this tag.
Declaration
Swift
public var description: String { get }