pub struct Container {Show 59 fields
pub id: usize,
pub str_id: Option<String>,
pub classes: Vec<String>,
pub data: HashMap<String, String>,
pub element: Element,
pub children: Vec<Container>,
pub direction: LayoutDirection,
pub overflow_x: LayoutOverflow,
pub overflow_y: LayoutOverflow,
pub grid_cell_size: Option<Number>,
pub justify_content: Option<JustifyContent>,
pub align_items: Option<AlignItems>,
pub text_align: Option<TextAlign>,
pub text_decoration: Option<TextDecoration>,
pub font_family: Option<Vec<String>>,
pub width: Option<Number>,
pub min_width: Option<Number>,
pub max_width: Option<Number>,
pub height: Option<Number>,
pub min_height: Option<Number>,
pub max_height: Option<Number>,
pub flex: Option<Flex>,
pub column_gap: Option<Number>,
pub row_gap: Option<Number>,
pub opacity: Option<Number>,
pub left: Option<Number>,
pub right: Option<Number>,
pub top: Option<Number>,
pub bottom: Option<Number>,
pub translate_x: Option<Number>,
pub translate_y: Option<Number>,
pub cursor: Option<Cursor>,
pub position: Option<Position>,
pub background: Option<Color>,
pub border_top: Option<(Color, Number)>,
pub border_right: Option<(Color, Number)>,
pub border_bottom: Option<(Color, Number)>,
pub border_left: Option<(Color, Number)>,
pub border_top_left_radius: Option<Number>,
pub border_top_right_radius: Option<Number>,
pub border_bottom_left_radius: Option<Number>,
pub border_bottom_right_radius: Option<Number>,
pub margin_left: Option<Number>,
pub margin_right: Option<Number>,
pub margin_top: Option<Number>,
pub margin_bottom: Option<Number>,
pub padding_left: Option<Number>,
pub padding_right: Option<Number>,
pub padding_top: Option<Number>,
pub padding_bottom: Option<Number>,
pub font_size: Option<Number>,
pub color: Option<Color>,
pub state: Option<Value>,
pub hidden: Option<bool>,
pub debug: Option<bool>,
pub visibility: Option<Visibility>,
pub route: Option<Route>,
pub actions: Vec<Action>,
pub overrides: Vec<ConfigOverride>,
}
Fields§
§id: usize
§str_id: Option<String>
§classes: Vec<String>
§data: HashMap<String, String>
§element: Element
§children: Vec<Container>
§direction: LayoutDirection
§overflow_x: LayoutOverflow
§overflow_y: LayoutOverflow
§grid_cell_size: Option<Number>
§justify_content: Option<JustifyContent>
§align_items: Option<AlignItems>
§text_align: Option<TextAlign>
§text_decoration: Option<TextDecoration>
§font_family: Option<Vec<String>>
§width: Option<Number>
§min_width: Option<Number>
§max_width: Option<Number>
§height: Option<Number>
§min_height: Option<Number>
§max_height: Option<Number>
§flex: Option<Flex>
§column_gap: Option<Number>
§row_gap: Option<Number>
§opacity: Option<Number>
§left: Option<Number>
§right: Option<Number>
§top: Option<Number>
§bottom: Option<Number>
§translate_x: Option<Number>
§translate_y: Option<Number>
§cursor: Option<Cursor>
§position: Option<Position>
§background: Option<Color>
§border_top: Option<(Color, Number)>
§border_right: Option<(Color, Number)>
§border_bottom: Option<(Color, Number)>
§border_left: Option<(Color, Number)>
§border_top_left_radius: Option<Number>
§border_top_right_radius: Option<Number>
§border_bottom_left_radius: Option<Number>
§border_bottom_right_radius: Option<Number>
§margin_left: Option<Number>
§margin_right: Option<Number>
§margin_top: Option<Number>
§margin_bottom: Option<Number>
§padding_left: Option<Number>
§padding_right: Option<Number>
§padding_top: Option<Number>
§padding_bottom: Option<Number>
§font_size: Option<Number>
§color: Option<Color>
§state: Option<Value>
§debug: Option<bool>
§visibility: Option<Visibility>
§route: Option<Route>
§actions: Vec<Action>
§overrides: Vec<ConfigOverride>
Implementations§
Source§impl Container
impl Container
pub fn iter_overrides( &self, recurse: bool, ) -> impl Iterator<Item = (&Container, &ConfigOverride)>
pub fn bfs(&self) -> BfsPaths
pub fn bfs_visit(&self, visitor: impl FnMut(&Container)) -> BfsPaths
pub fn bfs_visit_mut(&mut self, visitor: impl FnMut(&mut Container)) -> BfsPaths
Source§impl Container
impl Container
pub fn is_visible(&self) -> bool
pub fn is_span(&self) -> bool
pub fn is_flex_container(&self) -> bool
pub fn visible_elements(&self) -> impl Iterator<Item = &Container>
pub fn visible_elements_mut(&mut self) -> impl Iterator<Item = &mut Container>
pub fn relative_positioned_elements(&self) -> impl Iterator<Item = &Container>
pub fn relative_positioned_elements_mut( &mut self, ) -> impl Iterator<Item = &mut Container>
pub fn absolute_positioned_elements(&self) -> impl Iterator<Item = &Container>
pub fn absolute_positioned_elements_mut( &mut self, ) -> impl Iterator<Item = &mut Container>
pub fn fixed_positioned_elements(&self) -> impl Iterator<Item = &Container>
pub fn fixed_positioned_elements_mut( &mut self, ) -> impl Iterator<Item = &mut Container>
pub fn find_element_by_id(&self, id: usize) -> Option<&Container>
pub fn find_element_by_id_mut(&mut self, id: usize) -> Option<&mut Container>
pub fn find_element_by_str_id(&self, str_id: &str) -> Option<&Container>
pub fn find_element_by_class(&self, class: &str) -> Option<&Container>
pub fn find_element_by_str_id_mut( &mut self, str_id: &str, ) -> Option<&mut Container>
pub fn find_parent<'a>(&self, root: &'a mut Container) -> Option<&'a Container>
pub fn find_parent_by_id(&self, id: usize) -> Option<&Container>
pub fn find_parent_by_id_mut(&mut self, id: usize) -> Option<&mut Container>
pub fn find_parent_by_str_id_mut(&mut self, id: &str) -> Option<&mut Container>
Sourcepub fn replace_with_elements(
&mut self,
replacement: Vec<Container>,
root: &mut Container,
) -> Container
pub fn replace_with_elements( &mut self, replacement: Vec<Container>, root: &mut Container, ) -> Container
§Panics
- If the
Container
is the root node - If the
Container
is not properly attached to the tree
Sourcepub fn replace_id_children_with_elements(
&mut self,
replacement: Vec<Container>,
id: usize,
) -> Option<Vec<Container>>
pub fn replace_id_children_with_elements( &mut self, replacement: Vec<Container>, id: usize, ) -> Option<Vec<Container>>
§Panics
- If the
Container
is not properly attached to the tree
Source§impl Container
impl Container
Sourcepub fn table_iter<'a, 'b>(&'a self) -> TableIter<'b>where
'a: 'b,
pub fn table_iter<'a, 'b>(&'a self) -> TableIter<'b>where
'a: 'b,
§Panics
Will panic if Element
is not a table
Sourcepub fn table_iter_mut<'a, 'b>(&'a mut self) -> TableIterMut<'b>where
'a: 'b,
pub fn table_iter_mut<'a, 'b>(&'a mut self) -> TableIterMut<'b>where
'a: 'b,
§Panics
Will panic if Element
is not a table
Sourcepub fn table_iter_mut_with_observer<'a, 'b>(
&'a mut self,
observer: Option<impl FnMut(&mut Container)>,
) -> TableIterMut<'b>where
'a: 'b,
pub fn table_iter_mut_with_observer<'a, 'b>(
&'a mut self,
observer: Option<impl FnMut(&mut Container)>,
) -> TableIterMut<'b>where
'a: 'b,
§Panics
Will panic if Element
is not a table
Trait Implementations§
impl StructuralPartialEq for Container
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnwindSafe for Container
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
Mutably borrows from an owned value. Read more