Instance Methodsliemeobn.elementary 0.5.0Elementary
render(into:)
Html+Rendering.swift:25This declaration is deprecated: will be removed, use async API render(into:chunkSize:) instead
consuming func render(into writer: @escaping (String) -> Void)
This declaration is deprecated: will be removed, use async API render(into:chunkSize:) instead
consuming func render(into writer: @escaping (String) -> Void)
import Elementary
protocol HTML<Tag>
A type that represents HTML content that can be rendered.
@frozen struct String
A Unicode string value that is a collection of characters.
typealias Void = ()
The return type of functions that don’t explicitly specify a return type, that is, an empty tuple ()
.
static func _render<Renderer>(_ html: consuming Self, into renderer: inout Renderer, with context: consuming _RenderingContext) where Renderer : _HTMLRendering
static func _render<Renderer>(_ html: consuming Self, into renderer: inout Renderer, with context: consuming _RenderingContext) async throws where Renderer : _AsyncHTMLRendering
func environment<T>(_ taskLocal: TaskLocal<T>, _ value: T) -> _ModifiedTaskLocal<T, Self> where T : Sendable
Sets the value of a TaskLocal
for the duration of rendering the content.
consuming func render() -> String
Renders the HTML content into a single string.
consuming func render(into writer: some HTMLStreamWriter, chunkSize: Int = 1024) async throws
Renders the HTML content into a stream writer.
consuming func renderAsync() async throws -> String
Renders the HTML content into a single string asynchronously.
consuming func renderFormatted() -> String
Renders the HTML content into a formatted string.