Skip to main content

InnerCoordinator

Struct InnerCoordinator 

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

Inner coordinator that wraps the layout node’s intrinsic content (MeasurePolicy).

This is analogous to Jetpack Compose’s InnerNodeCoordinator.

Implementations§

Source§

impl<'a> InnerCoordinator<'a>

Source

pub fn new( measure_policy: Rc<dyn MeasurePolicy>, measurables: &'a [Box<dyn Measurable>], result_holder: Rc<RefCell<Option<MeasureResult>>>, ) -> Self

Creates a new inner coordinator with the given measure policy and children.

Trait Implementations§

Source§

impl<'a> Measurable for InnerCoordinator<'a>

Source§

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

Measures the child with the provided constraints, returning a Placeable.
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 InnerCoordinator<'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§

§

impl<'a> !Freeze for InnerCoordinator<'a>

§

impl<'a> !RefUnwindSafe for InnerCoordinator<'a>

§

impl<'a> !Send for InnerCoordinator<'a>

§

impl<'a> !Sync for InnerCoordinator<'a>

§

impl<'a> Unpin for InnerCoordinator<'a>

§

impl<'a> !UnwindSafe for InnerCoordinator<'a>

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.