pub struct PlainLayoutFns { /* private fields */ }Expand description
How a plain layout element measures, read from its words: what a coordinator keeps of the element’s type.
Implementations§
Source§impl PlainLayoutFns
impl PlainLayoutFns
Sourcepub const fn of<E: PlainLayout>() -> Self
pub const fn of<E: PlainLayout>() -> Self
The table of the plain layout element E.
Sourcepub fn prepare(&self, words: &[u32; 5], at: PrepareAt) -> [u32; 5]
pub fn prepare(&self, words: &[u32; 5], at: PrepareAt) -> [u32; 5]
The words of the element words hold as a coordinator keeps it for
the measures at tells; see PlainLayout::prepared. The other
calls take prepared words.
Sourcepub fn measure(
&self,
words: &[u32],
context: &mut dyn ModifierNodeContext,
measurable: &dyn Measurable,
constraints: Constraints,
) -> LayoutModifierMeasureResult
pub fn measure( &self, words: &[u32], context: &mut dyn ModifierNodeContext, measurable: &dyn Measurable, constraints: Constraints, ) -> LayoutModifierMeasureResult
Measures as the element words hold does.
Sourcepub fn measure_hold(
&self,
words: &[u32],
density: f32,
constraints: Constraints,
size: Size,
wrapped: WrappedHold,
) -> Option<ConstraintsHold>
pub fn measure_hold( &self, words: &[u32], density: f32, constraints: Constraints, size: Size, wrapped: WrappedHold, ) -> Option<ConstraintsHold>
The hold of the last measure of the element words hold.
Sourcepub fn intrinsic(
&self,
words: &[u32],
measurable: &dyn Measurable,
kind: PlainIntrinsic,
density: f32,
) -> f32
pub fn intrinsic( &self, words: &[u32], measurable: &dyn Measurable, kind: PlainIntrinsic, density: f32, ) -> f32
The intrinsic size kind names of the element words hold.
Trait Implementations§
Auto Trait Implementations§
impl Forget for PlainLayoutFns
impl Freeze for PlainLayoutFns
impl Move for PlainLayoutFns
impl RefUnwindSafe for PlainLayoutFns
impl Send for PlainLayoutFns
impl Sync for PlainLayoutFns
impl Unpin for PlainLayoutFns
impl UnsafeUnpin for PlainLayoutFns
impl UnwindSafe for PlainLayoutFns
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