Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
mattt edited this page Mar 12, 2020 · 4 revisions

HTML

An object whose content can be created using string interpolation in a way that interprets values according to the context at which the interpolation occurs.

public struct HTML: LosslessStringConvertible, Equatable, Hashable

For more information, see this project's README.

Inheritance

Equatable, Hashable, LosslessStringConvertible

Nested Types

HTML.HTML.HTML.Parser.State.QuotationMark.Disposition.HTML.HTML.HTML.HTML.StringInterpolation

Initializers

init(_:)

Creates an HTML object with the specified content.

public init(_ description: String)
  • Parameter description: The HTML content.

init(decoder:)

public init(decoder: Decoder) throws

init(literalCapacity:interpolationCount:)

public init(literalCapacity: Int, interpolationCount: Int)

init(stringInterpolation:)

public init(stringInterpolation: StringInterpolation)

init(stringLiteral:)

public init(stringLiteral value: String)

Properties

description

The HTML content.

var description: String

html

var html: HTML

Methods

<(lhs:rhs:)

public static func <(lhs: HTML, rhs: HTML) -> Bool

appendInterpolation(_:)

public mutating func appendInterpolation<T>(_ value: T) where T: CustomStringConvertible

appendInterpolation(comment:)

public mutating func appendInterpolation(comment string: String)

appendInterpolation(unsafeUnescaped:)

public mutating func appendInterpolation(unsafeUnescaped string: String)

appendLiteral(_:)

public mutating func appendLiteral(_ literal: String)

encode(to:)

public func encode(to encoder: Encoder) throws