Trait LayoutBlockContainer
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 { ... }
}Expand description
Extends LayoutPartialTree with getters for the styles required for CSS Block layout
Required Associated Types§
type BlockContainerStyle<'a>: BlockContainerStyle
where
Self: 'a
type BlockContainerStyle<'a>: BlockContainerStyle where Self: 'a
The style type representing the CSS Block container’s styles
type 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§
fn 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
fn 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§
fn 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", so this trait is not object safe.