Structuresliemeobn.elementary 0.2.0Elementary
HTMLComment
A type that represents an HTML comment.
Html+Elements.swift:61struct HTMLComment
A comment is rendered as <!--text-->
and the text will be escaped if necessary.
Citizens in Elementary
Conformances
protocol HTML<Tag>
A type that represents HTML content that can be rendered.
protocol Sendable
A type whose values can safely be passed across concurrency domains by copying.
Type members
init(String
) Creates a new HTML comment with the specified text.
Show system interfaces (2)
Hide system interfaces
Instance members
var text: String
The text of the comment.
Type features
Show implementation details (2)
Hide implementation details
Instance features
func render(
) -> String Renders the HTML content into a single string.
func render(into: some HTMLStreamWriter, chunkSize: Int
) async throws Renders the HTML content into a stream writer.
func renderAsync(
) async throws -> String Renders the HTML content into a single string asynchronously.
func renderFormatted(
) -> String Renders the HTML content into a formatted string.