pub trait LayoutBlockContainer: LayoutPartialTree {
type BlockContainerStyle<'a>: BlockContainerStyle
where Self: 'a;
type BlockItemStyle<'a>: BlockItemStyle
where Self: 'a;
// Required methods
fn get_block_container_style(
&self,
node_id: NodeId,
) -> Self::BlockContainerStyle<'_>;
fn get_block_child_style(
&self,
child_node_id: NodeId,
) -> Self::BlockItemStyle<'_>;
// Provided method
fn compute_block_child_layout(
&mut self,
node_id: NodeId,
inputs: LayoutInput,
block_ctx: Option<&mut BlockContext<'_>>,
) -> LayoutOutput { ... }
}Available on crate feature
block_layout only.Expand description
Extends LayoutPartialTree with getters for the styles required for CSS Block layout
Required Associated Types§
Sourcetype BlockContainerStyle<'a>: BlockContainerStyle
where
Self: 'a
type BlockContainerStyle<'a>: BlockContainerStyle where Self: 'a
The style type representing the CSS Block container’s styles
Sourcetype BlockItemStyle<'a>: BlockItemStyle
where
Self: 'a
type BlockItemStyle<'a>: BlockItemStyle where Self: 'a
The style type representing each CSS Block item’s styles
Required Methods§
Sourcefn get_block_container_style(
&self,
node_id: NodeId,
) -> Self::BlockContainerStyle<'_>
fn get_block_container_style( &self, node_id: NodeId, ) -> Self::BlockContainerStyle<'_>
Get the container’s styles
Sourcefn get_block_child_style(
&self,
child_node_id: NodeId,
) -> Self::BlockItemStyle<'_>
fn get_block_child_style( &self, child_node_id: NodeId, ) -> Self::BlockItemStyle<'_>
Get the child’s styles
Provided Methods§
Sourcefn compute_block_child_layout(
&mut self,
node_id: NodeId,
inputs: LayoutInput,
block_ctx: Option<&mut BlockContext<'_>>,
) -> LayoutOutput
fn compute_block_child_layout( &mut self, node_id: NodeId, inputs: LayoutInput, block_ctx: Option<&mut BlockContext<'_>>, ) -> LayoutOutput
Compute the specified node’s size or full layout given the specified constraints
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".