Skip to main content

CssPropertyCache

Struct CssPropertyCache 

Source
pub struct CssPropertyCache {
    pub node_count: usize,
    pub user_overridden_properties: Vec<Vec<(CssPropertyType, CssProperty)>>,
    pub cascaded_props: FlatVecVec<StatefulCssProperty>,
    pub css_props: FlatVecVec<StatefulCssProperty>,
    pub computed_values: Vec<Vec<(CssPropertyType, CssPropertyWithOrigin)>>,
    pub compact_cache: Option<CompactLayoutCache>,
    pub global_css_props: Vec<CssProperty>,
    pub resolved_font_sizes_px: OnceLock<Vec<f32>>,
}

Fields§

§node_count: usize§user_overridden_properties: Vec<Vec<(CssPropertyType, CssProperty)>>§cascaded_props: FlatVecVec<StatefulCssProperty>§css_props: FlatVecVec<StatefulCssProperty>§computed_values: Vec<Vec<(CssPropertyType, CssPropertyWithOrigin)>>§compact_cache: Option<CompactLayoutCache>§global_css_props: Vec<CssProperty>§resolved_font_sizes_px: OnceLock<Vec<f32>>

Per-node resolved font-size, in pixels, for the Normal pseudo-state. Populated lazily on first call to [crate::styled_dom::StyledDom::resolved_font_size_px] via a single bottom-up DOM walk; subsequent reads are O(1) Vec index by NodeId::index().

Motivation: get_font_size is called ~730× per node per layout pass (see AZ_PROP_COUNT=1 report — 329 629 cascade walks on excel.html alone). Each resolution recursively reads the parent’s font-size (for em) plus the root’s font-size (for rem), multiplying the walk count. Caching the pre-resolved pixel value collapses that to a single Vec<f32> indexed lookup.

Implementations§

Source§

impl CssPropertyCache

Source

pub fn build_compact_cache( &self, node_data: &[NodeData], prev_font_hashes: &[u64], ) -> CompactLayoutCache

Build a CompactLayoutCache from the current property cache state.

Must be called after restyle(), apply_ua_css(), and compute_inherited_values(). Resolves all layout-relevant properties for every node in the “normal” state (no hover/active/focus) and encodes them into compact arrays.

Tier 1/2/2b provide fast-path access for layout-hot properties. Non-compact properties (background, transform, box-shadow, etc.) are resolved via the slow cascade path in get_property_slow().

prev_font_hashes is the per-node font hash array from the previous frame. When non-empty, each node’s new font_family_hash is compared against the previous value, and differing nodes are recorded in font_dirty_nodes. On the first build (empty slice), ALL text nodes are marked dirty.

Source

pub fn build_compact_cache_with_inheritance( &self, node_data: &[NodeData], node_hierarchy: &[NodeHierarchyItem], prev_font_hashes: &[u64], ) -> CompactLayoutCache

Build compact cache with inheritance in a single pass.

Replaces the separate compute_inherited_values() + build_compact_cache() calls. For each node (in DOM index order, which is pre-order = parents before children):

  1. Copy parent’s compact values for INHERITABLE properties
  2. Apply this node’s CSS properties on top (from css_props + inline + UA)
  3. Write directly to compact arrays

This eliminates 50K Vec clones from compute_inherited_values and avoids re-reading properties from 5 separate data structures.

Source

pub fn build_compact_cache_with_inheritance_debug( &self, node_data: &[NodeData], node_hierarchy: &[NodeHierarchyItem], prev_font_hashes: &[u64], debug_messages: &mut Option<Vec<LayoutDebugMessage>>, ) -> CompactLayoutCache

Same as build_compact_cache_with_inheritance but with optional debug logging.

Source§

impl CssPropertyCache

Source

pub fn memory_breakdown(&self) -> CssPropertyCacheBreakdown

Approximate heap bytes retained by this cache, broken out by subfield. Used by StyledDom::memory_breakdown + the AZ_MEM_BREAKDOWN=1 reporter. Sums capacity × element size for each Vec and adds a coarse allowance for the inner Vec headers inside computed_values.

This is a measurement helper, not a tight bound — it doesn’t chase into the CssProperty enum variants that carry their own Vec/String allocations (notably FontFamilyStyleFontFamilyVecVec<StyleFontFamily>), so the real heap footprint for a property-rich DOM can be 2-3× these numbers. Still useful for spotting gross duplication between the pre-compact and compact caches.

Source

pub fn prune_compact_normal_props(&mut self)

Drop Normal-state properties that have compact encodings from css_props and cascaded_props. After build_compact_cache_with_inheritance, these are redundant — the compact cache is the source of truth for layout. Non-Normal entries (hover/active/focus) and non-compact properties (background, box-shadow, transform, etc.) are kept for get_property_slow.

Source§

impl CssPropertyCache

Source

pub fn restyle( &mut self, css: &mut Css, node_data: &NodeDataContainerRef<'_, NodeData>, node_hierarchy: &NodeHierarchyItemVec, non_leaf_nodes: &ParentWithNodeDepthVec, html_tree: &NodeDataContainerRef<'_, CascadeInfo>, ) -> Vec<TagIdToNodeIdMapping>

Match CSS selectors to nodes and populate css_props. Returns tag IDs for hit-testing. If compact_cache is available, uses it for fast display/overflow checks; otherwise falls back to slow path.

Source

pub fn generate_tag_ids( &self, node_data: &NodeDataContainerRef<'_, NodeData>, node_hierarchy: &NodeHierarchyItemVec, ) -> Vec<TagIdToNodeIdMapping>

Generate hit-test tag IDs for nodes that need event handling. Uses compact cache (if available) for fast display/overflow reads. Can be called separately after build_compact_cache_with_inheritance.

Source

pub fn get_computed_css_style_string( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> String

Source§

impl CssPropertyCache

Source

pub fn empty(node_count: usize) -> Self

Source

pub fn invalidate_resolved_font_sizes(&mut self)

Clear the lazily-populated font-size cache. Call after any mutation that could change resolved font-sizes (restyle, DOM mutation, append, etc.). The next [crate::styled_dom::StyledDom::resolved_font_size_px] call repopulates via a single bottom-up tree walk.

Source

pub fn append(&mut self, other: &mut Self)

Source

pub fn is_horizontal_overflow_visible( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn is_vertical_overflow_visible( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn is_horizontal_overflow_hidden( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn is_vertical_overflow_hidden( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn get_text_color_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleTextColor

Source

pub fn get_font_id_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleFontFamilyVec

Returns the font family of the node, or the default font family if none is set.

Source

pub fn get_font_size_or_default( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> StyleFontSize

Source

pub fn has_border( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn has_box_shadow( &self, node_data: &NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> bool

Source

pub fn get_property<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, css_property_type: &CssPropertyType, ) -> Option<&'a CssProperty>

Source

pub fn get_background_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundContentVecValue>

Source

pub fn get_hyphens<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleHyphensValue>

Source

pub fn get_word_break<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleWordBreakValue>

Source

pub fn get_overflow_wrap<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleOverflowWrapValue>

Source

pub fn get_line_break<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleLineBreakValue>

Source

pub fn get_text_align_last<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextAlignLastValue>

Source

pub fn get_text_transform<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextTransformValue>

Source

pub fn get_object_fit<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleObjectFitValue>

Source

pub fn get_text_orientation<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextOrientationValue>

Source

pub fn get_object_position<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleObjectPositionValue>

Source

pub fn get_aspect_ratio<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleAspectRatioValue>

Source

pub fn get_direction<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleDirectionValue>

Source

pub fn get_unicode_bidi<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleUnicodeBidiValue>

Source

pub fn get_text_box_trim<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextBoxTrimValue>

Source

pub fn get_text_box_edge<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextBoxEdgeValue>

Source

pub fn get_dominant_baseline<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleDominantBaselineValue>

Source

pub fn get_alignment_baseline<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleAlignmentBaselineValue>

Source

pub fn get_initial_letter_align<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleInitialLetterAlignValue>

Source

pub fn get_initial_letter_wrap<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleInitialLetterWrapValue>

Source

pub fn get_scrollbar_gutter<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleScrollbarGutterValue>

Source

pub fn get_overflow_clip_margin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleOverflowClipMarginValue>

Source

pub fn get_clip<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleClipRectValue>

Source

pub fn get_white_space<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleWhiteSpaceValue>

Source

pub fn get_background_position<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundPositionVecValue>

Source

pub fn get_background_size<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundSizeVecValue>

Source

pub fn get_background_repeat<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundRepeatVecValue>

Source

pub fn get_font_size<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontSizeValue>

Source

pub fn get_font_family<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontFamilyVecValue>

Source

pub fn get_font_weight<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontWeightValue>

Source

pub fn get_font_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontStyleValue>

Source

pub fn get_text_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextColorValue>

Source

pub fn get_text_indent<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextIndentValue>

Source

pub fn get_initial_letter<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleInitialLetterValue>

Source

pub fn get_line_clamp<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleLineClampValue>

Source

pub fn get_hanging_punctuation<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleHangingPunctuationValue>

Source

pub fn get_text_combine_upright<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextCombineUprightValue>

Source

pub fn get_exclusion_margin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleExclusionMarginValue>

Source

pub fn get_hyphenation_language<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleHyphenationLanguageValue>

Source

pub fn get_caret_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a CaretColorValue>

Source

pub fn get_caret_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a CaretWidthValue>

Source

pub fn get_caret_animation_duration<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a CaretAnimationDurationValue>

Source

pub fn get_selection_background_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a SelectionBackgroundColorValue>

Source

pub fn get_selection_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a SelectionColorValue>

Source

pub fn get_selection_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a SelectionRadiusValue>

Source

pub fn get_text_justify<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutTextJustifyValue>

Source

pub fn get_z_index<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutZIndexValue>

Source

pub fn get_flex_basis<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexBasisValue>

Source

pub fn get_column_gap<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutColumnGapValue>

Source

pub fn get_row_gap<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutRowGapValue>

Source

pub fn get_grid_template_columns<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutGridTemplateColumnsValue>

Source

pub fn get_grid_template_rows<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutGridTemplateRowsValue>

Source

pub fn get_grid_auto_columns<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutGridAutoColumnsValue>

Source

pub fn get_grid_auto_rows<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutGridAutoRowsValue>

Source

pub fn get_grid_column<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutGridColumnValue>

Source

pub fn get_grid_row<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutGridRowValue>

Source

pub fn get_grid_auto_flow<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutGridAutoFlowValue>

Source

pub fn get_justify_self<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutJustifySelfValue>

Source

pub fn get_justify_items<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutJustifyItemsValue>

Source

pub fn get_gap<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutGapValue>

Source

pub fn get_align_self<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutAlignSelfValue>

Source

pub fn get_font<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFontValue>

Source

pub fn get_writing_mode<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutWritingModeValue>

Source

pub fn get_clear<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutClearValue>

Source

pub fn get_shape_outside<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ShapeOutsideValue>

Source

pub fn get_shape_inside<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ShapeInsideValue>

Source

pub fn get_clip_path<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ClipPathValue>

Source

pub fn get_scrollbar_track<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundContentValue>

Method for getting scrollbar track background

Source

pub fn get_scrollbar_thumb<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundContentValue>

Method for getting scrollbar thumb background

Source

pub fn get_scrollbar_button<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundContentValue>

Method for getting scrollbar button background

Source

pub fn get_scrollbar_corner<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundContentValue>

Method for getting scrollbar corner background

Source

pub fn get_scrollbar_resizer<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackgroundContentValue>

Method for getting scrollbar resizer background

Source

pub fn get_scrollbar_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutScrollbarWidthValue>

Source

pub fn get_scrollbar_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleScrollbarColorValue>

Source

pub fn get_scrollbar_visibility<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ScrollbarVisibilityModeValue>

Source

pub fn get_scrollbar_fade_delay<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ScrollbarFadeDelayValue>

Source

pub fn get_scrollbar_fade_duration<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ScrollbarFadeDurationValue>

Source

pub fn get_visibility<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleVisibilityValue>

Source

pub fn get_break_before<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a PageBreakValue>

Source

pub fn get_break_after<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a PageBreakValue>

Source

pub fn get_break_inside<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a BreakInsideValue>

Source

pub fn get_orphans<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a OrphansValue>

Source

pub fn get_widows<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a WidowsValue>

Source

pub fn get_box_decoration_break<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a BoxDecorationBreakValue>

Source

pub fn get_column_count<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ColumnCountValue>

Source

pub fn get_column_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ColumnWidthValue>

Source

pub fn get_column_span<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ColumnSpanValue>

Source

pub fn get_column_fill<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ColumnFillValue>

Source

pub fn get_column_rule_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ColumnRuleWidthValue>

Source

pub fn get_column_rule_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ColumnRuleStyleValue>

Source

pub fn get_column_rule_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ColumnRuleColorValue>

Source

pub fn get_flow_into<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a FlowIntoValue>

Source

pub fn get_flow_from<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a FlowFromValue>

Source

pub fn get_shape_margin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ShapeMarginValue>

Source

pub fn get_shape_image_threshold<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ShapeImageThresholdValue>

Source

pub fn get_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a ContentValue>

Source

pub fn get_counter_reset<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a CounterResetValue>

Source

pub fn get_counter_increment<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a CounterIncrementValue>

Source

pub fn get_string_set<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StringSetValue>

Source

pub fn get_text_align<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextAlignValue>

Source

pub fn get_user_select<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleUserSelectValue>

Source

pub fn get_text_decoration<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTextDecorationValue>

Source

pub fn get_vertical_align<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleVerticalAlignValue>

Source

pub fn get_line_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleLineHeightValue>

Source

pub fn get_letter_spacing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleLetterSpacingValue>

Source

pub fn get_word_spacing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleWordSpacingValue>

Source

pub fn get_tab_size<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTabSizeValue>

Source

pub fn get_cursor<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleCursorValue>

Source

pub fn get_box_shadow_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_box_shadow_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_box_shadow_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_box_shadow_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_border_top_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopColorValue>

Source

pub fn get_border_left_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderLeftColorValue>

Source

pub fn get_border_right_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderRightColorValue>

Source

pub fn get_border_bottom_color<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomColorValue>

Source

pub fn get_border_top_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopStyleValue>

Source

pub fn get_border_left_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderLeftStyleValue>

Source

pub fn get_border_right_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderRightStyleValue>

Source

pub fn get_border_bottom_style<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomStyleValue>

Source

pub fn get_border_top_left_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopLeftRadiusValue>

Source

pub fn get_border_top_right_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderTopRightRadiusValue>

Source

pub fn get_border_bottom_left_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomLeftRadiusValue>

Source

pub fn get_border_bottom_right_radius<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderBottomRightRadiusValue>

Source

pub fn get_opacity<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleOpacityValue>

Source

pub fn get_transform<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTransformVecValue>

Source

pub fn get_transform_origin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleTransformOriginValue>

Source

pub fn get_perspective_origin<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StylePerspectiveOriginValue>

Source

pub fn get_backface_visibility<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBackfaceVisibilityValue>

Source

pub fn get_display<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutDisplayValue>

Source

pub fn get_float<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFloatValue>

Source

pub fn get_box_sizing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBoxSizingValue>

Source

pub fn get_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutWidthValue>

Source

pub fn get_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutHeightValue>

Source

pub fn get_min_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMinWidthValue>

Source

pub fn get_min_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMinHeightValue>

Source

pub fn get_max_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMaxWidthValue>

Source

pub fn get_max_height<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMaxHeightValue>

Source

pub fn get_position<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPositionValue>

Source

pub fn get_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutTopValue>

Source

pub fn get_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutInsetBottomValue>

Source

pub fn get_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutRightValue>

Source

pub fn get_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutLeftValue>

Source

pub fn get_padding_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingTopValue>

Source

pub fn get_padding_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingBottomValue>

Source

pub fn get_padding_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingLeftValue>

Source

pub fn get_padding_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutPaddingRightValue>

Source

pub fn get_margin_top<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginTopValue>

Source

pub fn get_margin_bottom<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginBottomValue>

Source

pub fn get_margin_left<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginLeftValue>

Source

pub fn get_margin_right<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutMarginRightValue>

Source

pub fn get_border_top_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderTopWidthValue>

Source

pub fn get_border_left_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderLeftWidthValue>

Source

pub fn get_border_right_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderRightWidthValue>

Source

pub fn get_border_bottom_width<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderBottomWidthValue>

Source

pub fn get_overflow_x<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutOverflowValue>

Source

pub fn get_overflow_y<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutOverflowValue>

Source

pub fn get_overflow_block<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutOverflowValue>

Source

pub fn get_overflow_inline<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutOverflowValue>

Source

pub fn get_flex_direction<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexDirectionValue>

Source

pub fn get_flex_wrap<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexWrapValue>

Source

pub fn get_flex_grow<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexGrowValue>

Source

pub fn get_flex_shrink<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutFlexShrinkValue>

Source

pub fn get_justify_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutJustifyContentValue>

Source

pub fn get_align_items<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutAlignItemsValue>

Source

pub fn get_align_content<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutAlignContentValue>

Source

pub fn get_mix_blend_mode<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleMixBlendModeValue>

Source

pub fn get_filter<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFilterVecValue>

Source

pub fn get_backdrop_filter<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleFilterVecValue>

Source

pub fn get_text_shadow<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBoxShadowValue>

Source

pub fn get_list_style_type<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleListStyleTypeValue>

Source

pub fn get_list_style_position<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleListStylePositionValue>

Source

pub fn get_table_layout<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutTableLayoutValue>

Source

pub fn get_border_collapse<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleBorderCollapseValue>

Source

pub fn get_border_spacing<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a LayoutBorderSpacingValue>

Source

pub fn get_caption_side<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleCaptionSideValue>

Source

pub fn get_empty_cells<'a>( &'a self, node_data: &'a NodeData, node_id: &NodeId, node_state: &StyledNodeState, ) -> Option<&'a StyleEmptyCellsValue>

Source

pub fn calc_width( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> f32

Source

pub fn calc_min_width( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> f32

Source

pub fn calc_max_width( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> Option<f32>

Source

pub fn calc_height( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> f32

Source

pub fn calc_min_height( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> f32

Source

pub fn calc_max_height( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> Option<f32>

Source

pub fn calc_left( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> Option<f32>

Source

pub fn calc_right( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> Option<f32>

Source

pub fn calc_top( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> Option<f32>

Source

pub fn calc_bottom( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> Option<f32>

Source

pub fn calc_border_left_width( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> f32

Source

pub fn calc_border_right_width( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> f32

Source

pub fn calc_border_top_width( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> f32

Source

pub fn calc_border_bottom_width( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> f32

Source

pub fn calc_padding_left( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> f32

Source

pub fn calc_padding_right( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> f32

Source

pub fn calc_padding_top( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> f32

Source

pub fn calc_padding_bottom( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> f32

Source

pub fn calc_margin_left( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> f32

Source

pub fn calc_margin_right( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_width: f32, ) -> f32

Source

pub fn calc_margin_top( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> f32

Source

pub fn calc_margin_bottom( &self, node_data: &NodeData, node_id: &NodeId, styled_node_state: &StyledNodeState, reference_height: f32, ) -> f32

Source

pub fn apply_ua_css(&mut self, node_data: &[NodeData])

Applies user-agent (UA) CSS properties to the cascade before inheritance.

UA CSS has the lowest priority in the cascade, so it should only be applied if the node doesn’t already have the property from inline styles or author CSS.

This is critical for text nodes: UA CSS properties (like font-weight: bold for H1) must be in the cascade maps so they can be inherited by child text nodes.

Uses a bitset per node to avoid O(n²) scanning of property vecs.

Source

pub fn sort_cascaded_props(&mut self)

Sort cascaded_props by (state, prop_type) and flatten into contiguous memory. Must be called after apply_ua_css() which adds entries to cascaded_props.

Source

pub fn compute_inherited_values( &mut self, node_hierarchy: &[NodeHierarchyItem], node_data: &[NodeData], ) -> Vec<NodeId>

Compute inherited values for all nodes in the DOM tree.

Implements CSS inheritance: walk tree depth-first, apply cascade priority (inherited → cascaded → css → inline → user), create dependency chains for relative values. Call apply_ua_css() before this function.

Trait Implementations§

Source§

impl Clone for CssPropertyCache

Source§

fn clone(&self) -> CssPropertyCache

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CssPropertyCache

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CssPropertyCache

Source§

fn default() -> CssPropertyCache

Returns the “default value” for a type. Read more
Source§

impl PartialEq for CssPropertyCache

Source§

fn eq(&self, other: &CssPropertyCache) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for CssPropertyCache

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.