pub struct LayoutChild { /* private fields */ }Expand description
A direct child layout node available during a measure pass.
Implementations§
Source§impl LayoutChild
impl LayoutChild
Sourcepub fn measure(
&self,
scope: &mut MeasureScope<'_>,
constraint: &Constraint,
) -> Result<MeasuredChild, MeasurementError>
pub fn measure( &self, scope: &mut MeasureScope<'_>, constraint: &Constraint, ) -> Result<MeasuredChild, MeasurementError>
Measures this child under the given constraint.
The child is borrowed by index from the current measure scope so the metadata map stays uniquely borrowed for the duration of the call.
Sourcepub fn probe(
&self,
scope: &mut MeasureScope<'_>,
constraint: &Constraint,
) -> Result<MeasuredChild, MeasurementError>
pub fn probe( &self, scope: &mut MeasureScope<'_>, constraint: &Constraint, ) -> Result<MeasuredChild, MeasurementError>
Probes this child under the given constraint.
A later probe or measure of the same child under the same constraint
reuses this result and does not call into the child again. A different
constraint is measured normally; only the final Self::measure is
recorded for the parent snapshot cache.
Sourcepub fn probe_intrinsic(
&self,
scope: &mut MeasureScope<'_>,
constraint: &Constraint,
) -> Result<MeasuredChild, MeasurementError>
pub fn probe_intrinsic( &self, scope: &mut MeasureScope<'_>, constraint: &Constraint, ) -> Result<MeasuredChild, MeasurementError>
Probes natural content dimensions without publishing layout or placements.
Minimum interactive-size padding is excluded. Other layout constraints and content padding still apply. Use this to choose shared visual dimensions before measuring the children normally for interaction. Results and metadata are isolated from the normal layout cache.
Sourcepub fn parent_data<T>(&self, scope: &MeasureScope<'_>) -> Option<T>
pub fn parent_data<T>(&self, scope: &MeasureScope<'_>) -> Option<T>
Reads a typed parent-data payload from this direct child layout node.
Trait Implementations§
Source§impl Clone for LayoutChild
impl Clone for LayoutChild
Source§fn clone(&self) -> LayoutChild
fn clone(&self) -> LayoutChild
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LayoutChild
impl Eq for LayoutChild
Source§impl Hash for LayoutChild
impl Hash for LayoutChild
impl LayoutPlacementTarget for LayoutChild
Auto Trait Implementations§
impl Freeze for LayoutChild
impl RefUnwindSafe for LayoutChild
impl Send for LayoutChild
impl Sync for LayoutChild
impl Unpin for LayoutChild
impl UnsafeUnpin for LayoutChild
impl UnwindSafe for LayoutChild
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.