Skip to main content

LayoutFlexboxContainer

Trait LayoutFlexboxContainer 

Source
pub trait LayoutFlexboxContainer: LayoutPartialTree {
    type FlexboxContainerStyle<'a>: FlexboxContainerStyle
       where Self: 'a;
    type FlexboxItemStyle<'a>: FlexboxItemStyle
       where Self: 'a;

    // Required methods
    fn get_flexbox_container_style(
        &self,
        node_id: NodeId,
    ) -> Self::FlexboxContainerStyle<'_>;
    fn get_flexbox_child_style(
        &self,
        child_node_id: NodeId,
    ) -> Self::FlexboxItemStyle<'_>;
}
Available on crate feature flexbox only.
Expand description

Extends LayoutPartialTree with getters for the styles required for Flexbox layout

Required Associated Types§

Source

type FlexboxContainerStyle<'a>: FlexboxContainerStyle where Self: 'a

The style type representing the Flexbox container’s styles

Source

type FlexboxItemStyle<'a>: FlexboxItemStyle where Self: 'a

The style type representing each Flexbox item’s styles

Required Methods§

Source

fn get_flexbox_container_style( &self, node_id: NodeId, ) -> Self::FlexboxContainerStyle<'_>

Get the container’s styles

Source

fn get_flexbox_child_style( &self, child_node_id: NodeId, ) -> Self::FlexboxItemStyle<'_>

Get the child’s styles

Interpreted in the container’s axes (see LayoutPartialTree::get_core_container_style).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§