Documentation
¶
Overview ¶
Package renderdiag defines source-free document rejection diagnostics shared by render adapters and the manager. It has no renderer or device dependency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRejected = errors.New("render: document rejected")
Functions ¶
This section is empty.
Types ¶
type Code ¶
type Code uint16
Code values 1–10 match the stable local BZE1 CSS diagnostic contract.
const ( InputLimit Code = 1 TokenLimit Code = 2 NestingLimit Code = 3 DeclarationLimit Code = 4 NonFiniteNumber Code = 5 Syntax Code = 6 UnknownProperty Code = 7 InvalidValue Code = 8 InvalidSelector Code = 9 UnsupportedRule Code = 10 // InvalidDocument is adapter-local, never accepted as a BZE1 wire code. InvalidDocument Code = 11 )
type Error ¶
type Error struct {
Code Code `json:"code"`
Source Source `json:"source"`
Element uint32 `json:"element"`
Start uint32 `json:"start"`
End uint32 `json:"end"`
}
Error describes one CSS source in canonical document order, including implied html/head/body elements. Start/End are decoded CSS UTF-8 byte offsets, not HTML offsets. Never retain source text, URLs or an upstream parser error here.
type Warning ¶
type Warning struct {
Code WarningCode `json:"code"`
Element uint32 `json:"element"`
}
Warning is bounded source-free evidence about a successfully rendered scene. Rejections use Error instead; callers can never mistake a partial failure for a successful target just because it has warnings.
type WarningCode ¶
type WarningCode string
const ( Clipped WarningCode = "clipped" MissingGlyph WarningCode = "missing-glyph" ReservedOverlap WarningCode = "reserved-overlap" )