Skip to main content

LayoutModifierCoordinator

Struct LayoutModifierCoordinator 

Source
pub struct LayoutModifierCoordinator<'a> { /* private fields */ }
Expand description

Coordinator that wraps a single LayoutModifierNode from the reconciled chain.

This is analogous to Jetpack Compose’s LayoutModifierNodeCoordinator. It delegates measurement to the wrapped node, passing the inner coordinator as the measurable.

Implementations§

Source§

impl<'a> LayoutModifierCoordinator<'a>

Source

pub fn new( node: Rc<RefCell<Box<dyn ModifierNode>>>, wrapped: Box<dyn NodeCoordinator + 'a>, context: Rc<RefCell<LayoutNodeContext>>, ) -> Self

Creates a new coordinator wrapping the specified node.

Trait Implementations§

Source§

impl<'a> Measurable for LayoutModifierCoordinator<'a>

Source§

fn measure(&self, constraints: Constraints) -> Box<dyn Placeable>

Measure through this coordinator

Source§

fn min_intrinsic_width(&self, height: f32) -> f32

Returns the minimum width achievable for the given height.
Source§

fn max_intrinsic_width(&self, height: f32) -> f32

Returns the maximum width achievable for the given height.
Source§

fn min_intrinsic_height(&self, width: f32) -> f32

Returns the minimum height achievable for the given width.
Source§

fn max_intrinsic_height(&self, width: f32) -> f32

Returns the maximum height achievable for the given width.
Source§

fn flex_parent_data(&self) -> Option<FlexParentData>

Returns flex parent data if this measurable has weight/fill properties. Default implementation returns None (no weight).
Source§

impl<'a> NodeCoordinator for LayoutModifierCoordinator<'a>

Source§

fn total_content_offset(&self) -> Point

Returns the accumulated placement offset from this coordinator down through the wrapped chain (inner-most coordinator).

Auto Trait Implementations§

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> 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 = 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.