Struct Tree

Source
pub struct Tree {
Show 15 fields pub parents: FxHashMap<NodeId, NodeId>, pub children: FxHashMap<NodeId, Vec<NodeId>>, pub heights: FxHashMap<NodeId, u16>, pub elements: FxHashMap<NodeId, Rc<dyn ElementExt>>, pub listeners: FxHashMap<EventName, Vec<NodeId>>, pub layer_state: FxHashMap<NodeId, LayerState>, pub accessibility_state: FxHashMap<NodeId, AccessibilityState>, pub effect_state: FxHashMap<NodeId, EffectState>, pub text_style_state: FxHashMap<NodeId, TextStyleState>, pub layout: Torin<NodeId>, pub layers: Layers, pub text_cache: TextCache, pub accessibility_groups: AccessibilityGroups, pub accessibility_diff: AccessibilityDirtyNodes, pub accessibility_generator: AccessibilityGenerator,
}

Fields§

§parents: FxHashMap<NodeId, NodeId>§children: FxHashMap<NodeId, Vec<NodeId>>§heights: FxHashMap<NodeId, u16>§elements: FxHashMap<NodeId, Rc<dyn ElementExt>>§listeners: FxHashMap<EventName, Vec<NodeId>>§layer_state: FxHashMap<NodeId, LayerState>§accessibility_state: FxHashMap<NodeId, AccessibilityState>§effect_state: FxHashMap<NodeId, EffectState>§text_style_state: FxHashMap<NodeId, TextStyleState>§layout: Torin<NodeId>§layers: Layers§text_cache: TextCache§accessibility_groups: AccessibilityGroups§accessibility_diff: AccessibilityDirtyNodes§accessibility_generator: AccessibilityGenerator

Implementations§

Source§

impl Tree

Source

pub fn size(&self) -> usize

Source

pub fn traverse_depth(&self, then: impl FnMut(NodeId))

Source

pub fn traverse_depth_cancel(&self, then: impl FnMut(NodeId) -> bool)

Source

pub fn apply_mutations(&mut self, mutations: Mutations) -> MutationsApplyResult

Source

pub fn print_metrics(&self)

Source

pub fn measure_layout( &mut self, size: Size2D, font_collection: &FontCollection, font_manager: &FontMgr, events_sender: &UnboundedSender<EventsChunk>, scale_factor: f64, fallback_fonts: &[Cow<'static, str>], )

Source

pub fn print_ascii(&self, node_id: NodeId, prefix: String, last: bool)

Source

pub fn verify_tree_integrity(&self)

Trait Implementations§

Source§

impl Debug for Tree

Source§

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

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

impl Default for Tree

Source§

fn default() -> Tree

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

Auto Trait Implementations§

§

impl Freeze for Tree

§

impl !RefUnwindSafe for Tree

§

impl !Send for Tree

§

impl !Sync for Tree

§

impl Unpin for Tree

§

impl !UnwindSafe for Tree

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more