Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
mattt edited this page Sep 24, 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

Codable, Comparable, Equatable, ExpressibleByStringInterpolation, ExpressibleByStringLiteral, Hashable, HypertextLiteralConvertible, LosslessStringConvertible

Initializers

init(_:​)

Creates an HTML object with the specified content.

public init(_ description:​ String)

Parameters

  • description:​ The HTML content.

init(decoder:​)

public init(decoder:​ Decoder) throws

init(stringLiteral:​)

public init(stringLiteral value:​ String)

init(stringInterpolation:​)

public init(stringInterpolation:​ StringInterpolation)

Properties

description

The HTML content.

var description:​ String

html

A representation of this instance in a hypertext literal.

var html:​ HTML

Methods

<(lhs:​rhs:​)

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

encode(to:​)

public func encode(to encoder:​ Encoder) throws