pub trait SubcomposeMeasureScope: SubcomposeLayoutScope {
// Required methods
fn subcompose<Content>(
&mut self,
slot_id: SlotId,
content: Content,
) -> Vec<SubcomposeChild>
where Content: FnOnce();
fn measure(
&mut self,
child: SubcomposeChild,
constraints: Constraints,
) -> SubcomposePlaceable;
fn node_has_no_parent(&self, node_id: NodeId) -> bool;
}Expand description
Public trait exposed to measure policies for subcomposition.
Required Methods§
fn subcompose<Content>(
&mut self,
slot_id: SlotId,
content: Content,
) -> Vec<SubcomposeChild>where
Content: FnOnce(),
Sourcefn measure(
&mut self,
child: SubcomposeChild,
constraints: Constraints,
) -> SubcomposePlaceable
fn measure( &mut self, child: SubcomposeChild, constraints: Constraints, ) -> SubcomposePlaceable
Measures a subcomposed child with the given constraints.
Sourcefn node_has_no_parent(&self, node_id: NodeId) -> bool
fn node_has_no_parent(&self, node_id: NodeId) -> bool
Checks if a node has no parent (is a root node). Used to filter subcompose results to only include true root nodes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.