Sign in

    mizchi/crater-core/layout_view does not have a README file

    LayoutView

    pub(open) trait LayoutView {
    fn uid(Self) -> Int
    fn computed_x(Self) -> Double
    fn computed_y(Self) -> Double
    fn computed_width(Self) -> Double
    fn computed_height(Self) -> Double
    fn children(Self) -> Array[Self]
    fn text(Self) -> String?
    fn resource_state(Self) -> ResourceLoadState?
    }

    Read-only view of a computed layout tree node.

    Implementations expose just the fields needed by external consumers (web vitals metrics, accessibility tree walks, etc.) without leaking layout-engine state. The layout engine's LayoutNode (in mizchi/crater-layout/tree) is the canonical implementation; tests and alternative engines can provide their own.

    ResourceLoadState

    pub(all) enum ResourceLoadState {
    Pending
    Resolved
    Error
    }

    Loading state of an intrinsic-sized resource (image, etc). Abstract view of layout-engine-specific resource tracking so that downstream consumers (web vitals, accessibility walks, ...) can reason about resource readiness without depending on the layout engine's internal state representation.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io