Skip to main content

GenericLayoutDataTrait

Trait GenericLayoutDataTrait 

Source
pub trait GenericLayoutDataTrait:
    Any
    + MallocSizeOfTrait
    + Send
    + Sync
    + 'static {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn set_text_run_selection(
        &self,
        new_range: Option<RangeAny<Utf32CodeUnits>>,
    ) -> bool;
    fn set_element_selection(&self, selected: bool) -> bool;
    fn rendered_text(&self, range: RangeAny<Utf32CodeUnits>) -> Option<String>;
}

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn set_text_run_selection( &self, new_range: Option<RangeAny<Utf32CodeUnits>>, ) -> bool

Returns whether new_range was successfully set on an existing text run

Source

fn set_element_selection(&self, selected: bool) -> bool

Set whether or not this node is selected when it is an element. Returns true if anything changed that requires a new display list.

Source

fn rendered_text(&self, range: RangeAny<Utf32CodeUnits>) -> Option<String>

Get the text rendered by this node, if it is a CharacterData node and produces a TextRun in the box tree.

Implementors§