Skip to main content

LayoutEngine

Struct LayoutEngine 

Source
pub struct LayoutEngine {
    pub stats: LayoutStats,
    /* private fields */
}

Fields§

§stats: LayoutStats

Statistics from the last frame.

Implementations§

Source§

impl LayoutEngine

Source

pub fn layout_frame( &mut self, root: &View, size_px: (u32, u32), textfield_states: &HashMap<u64, Rc<RefCell<TextFieldState>>>, interactions: &Interactions, focused: Option<u64>, ) -> (Scene, Vec<HitRegion>, Vec<SemNode>)

Source

pub fn intrinsic_size( &mut self, view: &View, mode: IntrinsicSizeMode, ) -> (f32, f32)

Source

pub fn new() -> Self

Source

pub fn debug_taffy_subtree(&self, node_id: NodeId) -> String

Debug dump of the taffy subtree rooted at node_id (styles + computed layout), for the devtools inspector. Empty string when the node has no taffy node. Backed by taffy’s write_tree.

Source

pub fn debug_grid_summary(&self, node_id: NodeId) -> Option<String>

One-line grid summary (track counts, line positions, resolved templates) for a grid container, for the devtools inspector. None when the node is not a grid container with detailed info. Requires taffy’s detailed_layout_info feature (default-on).

Trait Implementations§

Source§

impl Default for LayoutEngine

Source§

fn default() -> Self

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

Auto Trait Implementations§

§

impl !RefUnwindSafe for LayoutEngine

§

impl !Send for LayoutEngine

§

impl !Sync for LayoutEngine

§

impl !UnwindSafe for LayoutEngine

§

impl Forget for LayoutEngine

§

impl Freeze for LayoutEngine

§

impl Move for LayoutEngine

§

impl Unpin for LayoutEngine
where *const u8 is !null: Unpin, NonZero<u32>: Unpin, &'static str: Unpin, Arc<[TextSpan]>: Unpin, Arc<str>: Unpin, Arc<dyn Fn(&SubcomposeScope) -> Vec<(u64, View)>>: Unpin, Arc<ShapePath>: Unpin, Rc<dyn Fn(Vec2) -> Vec2>: Unpin, Rc<dyn Fn(Vec2, ScrollSource) -> Vec2>: Unpin, Rc<dyn Fn(f32)>: Unpin, Rc<dyn Fn() -> f32>: Unpin, Rc<dyn Fn()>: Unpin, Rc<dyn Fn(NestedScrollConnection)>: Unpin, Rc<dyn Fn() -> (f32, f32)>: Unpin, Rc<dyn Fn(f32, f32)>: Unpin, Rc<dyn Fn(&mut Scene, Rect, ControlVisualState)>: Unpin, Rc<dyn Fn(Vec2, NestedScrollSource) -> Vec2>: Unpin, Rc<dyn Fn(Vec2, Vec2, NestedScrollSource) -> Vec2>: Unpin, Rc<dyn Fn(PointerEvent)>: Unpin, Rc<dyn Fn(Rect)>: Unpin, Rc<dyn Fn(Vec2)>: Unpin, Rc<dyn Fn(KeyEvent) -> bool>: Unpin, Rc<dyn Fn(ImeEvent) -> bool>: Unpin, Rc<dyn Fn(LayoutConstraints) -> (Dp, Dp)>: Unpin, Rc<dyn Fn() -> GraphicsLayerScope>: Unpin, Rc<SharedElementInner>: Unpin, Rc<dyn ModifierNodeElement>: Unpin, Rc<dyn ModifierNode>: Unpin, Rc<Cell<bool>>: Unpin, Rc<dyn Fn(&mut Scene, Rect, f32)>: Unpin, Arc<dyn Any + Sync + Send>: Unpin, Rc<dyn Fn(DragStart) -> Option<Rc<dyn Any>>>: Unpin, Rc<dyn Fn(DragEnd)>: Unpin, Rc<dyn Fn(DragOver)>: Unpin, Rc<dyn Fn(DropEvent) -> bool>: Unpin, Rc<dyn Fn(&mut Scene, &DragPreviewCtx)>: Unpin, Rc<dyn Fn(Action) -> bool>: Unpin, Arc<CustomCursorImage>: Unpin, Rc<RefCell<Option<u64>>>: Unpin, Rc<dyn Fn(bool)>: Unpin, Rc<RefCell<InteractionState>>: Unpin, Rc<dyn Fn(String)>: Unpin, Rc<dyn VisualTransformation>: Unpin, Rc<dyn Fn(&TextLayoutResult)>: Unpin, Rc<dyn Fn(&dyn KeyboardActionScope)>: Unpin, Rc<RefCell<Option<TextRange>>>: Unpin, Rc<RefCell<TextLayoutGeometry>>: Unpin, Rc<dyn IndicationNodeFactory>: Unpin, *const NodeId is !null: Unpin, NodeId: Unpin, Arc<Vec<View>>: Unpin, *const (): Unpin, Box<DetailedGridInfo>: Unpin, Arc<VectorMeshData>: Unpin, Arc<[VectorMeshData]>: Unpin, Rc<Vec<SceneNode>>: Unpin, Rc<Vec<HitRegion>>: Unpin, Rc<Vec<Option<Arc<HitRegionMetadata>>>>: Unpin, Rc<Vec<SemNode>>: Unpin,

§

impl UnsafeUnpin for LayoutEngine

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> ErasedDestructor for T
where T: 'static,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.