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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.