pub struct ElementDetail {Show 13 fields
pub id: ElementId,
pub parent: Option<ElementId>,
pub depth: usize,
pub type_name: &'static str,
pub bounds: Rect,
pub parent_bounds: Option<Rect>,
pub constraints: Option<BoxConstraints>,
pub layout_size: Option<Size>,
pub dirty: bool,
pub stateful: bool,
pub animating: bool,
pub focusable: bool,
pub focused: bool,
}Expand description
拾取/布局 overlay 用的单元素只读详情(一次取齐 Inspector 需要的信息)。
与 ElementInfo 的区别:后者是「整棵树的行」,不含几何;本类型是「一个元素」,
含 bounds 与上一次 layout 的约束,供元素拾取与布局 overlay 使用。
Fields§
§id: ElementId§parent: Option<ElementId>§depth: usize相对根的深度(根 = 0)
type_name: &'static str§bounds: Rectroot layer 逻辑坐标下的占据区域。
优先用 RO 的 content_size();容器 RO 返回零尺寸时退回到 layout 结果尺寸,
这样拾取高亮不会显示成 0×0。
parent_bounds: Option<Rect>父元素占据区域,用于观察 margin/溢出;根元素为 None
constraints: Option<BoxConstraints>上一次 layout 收到的约束(从未布局过为 None)
layout_size: Option<Size>上一次 layout 返回的尺寸(从未布局过为 None)
dirty: bool§stateful: bool§animating: bool§focusable: bool§focused: boolTrait Implementations§
Source§impl Clone for ElementDetail
impl Clone for ElementDetail
impl Copy for ElementDetail
Source§impl Debug for ElementDetail
impl Debug for ElementDetail
Source§impl PartialEq for ElementDetail
impl PartialEq for ElementDetail
impl StructuralPartialEq for ElementDetail
Auto Trait Implementations§
impl Forget for ElementDetail
impl Freeze for ElementDetail
impl Move for ElementDetail
impl RefUnwindSafe for ElementDetail
impl Send for ElementDetail
impl Sync for ElementDetail
impl Unpin for ElementDetail
impl UnsafeUnpin for ElementDetail
impl UnwindSafe for ElementDetail
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
Mutably borrows from an owned value. Read more