Skip to main content

Mounted

Struct Mounted 

Source
pub struct Mounted<Msg> {
    pub root: NodeId,
    pub nodes: Vec<MountedNode<Msg>>,
    pub text_measures: HashMap<NodeId, TextMeasure>,
}
Expand description

Versión “instalada” del árbol: cada nodo tiene su NodeId de taffy, color y handler. Se mantiene en orden de inserción (recorrido pre-orden), así el hit-test puede iterar al revés para honrar el orden de pintado.

pub (con campos pub) porque el runtime (llimphi-ui) lee el árbol montado para hit-test y para la pasada GPU directa, pero vive en otro crate. No se construye fuera de mount.

Fields§

§root: NodeId§nodes: Vec<MountedNode<Msg>>§text_measures: HashMap<NodeId, TextMeasure>

Contenido de texto por nodo-hoja, para que el runtime lo mida con parley durante compute_with_measure y taffy reserve el alto real del texto envuelto (varias líneas) en vez de una sola. Sin esto un párrafo que envuelve a N líneas se aplastaría en la altura de una (el bug clásico de “textos aplastados”). Sólo se pueblan hojas con texto uniforme (sin runs multicolor, que el caller dimensiona).

Auto Trait Implementations§

§

impl<Msg> !RefUnwindSafe for Mounted<Msg>

§

impl<Msg> !UnwindSafe for Mounted<Msg>

§

impl<Msg> Freeze for Mounted<Msg>

§

impl<Msg> Send for Mounted<Msg>
where Msg: Send,

§

impl<Msg> Sync for Mounted<Msg>
where Msg: Sync,

§

impl<Msg> Unpin for Mounted<Msg>
where Msg: Unpin,

§

impl<Msg> UnsafeUnpin for Mounted<Msg>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,