pub struct Container { /* private fields */ }
Expand description
Represents a container with customizable aspects like size, color, border, and alignment.
Implementations§
Source§impl Container
impl Container
Sourcepub fn push(&mut self, component: impl Into<Components>)
pub fn push(&mut self, component: impl Into<Components>)
add component to end of list
Sourcepub fn component(self, component: impl Into<Components>) -> Self
pub fn component(self, component: impl Into<Components>) -> Self
Adds a single component to the container.
Sourcepub fn components(
self,
components: impl IntoIterator<Item = impl Into<Components>>,
) -> Self
pub fn components( self, components: impl IntoIterator<Item = impl Into<Components>>, ) -> Self
Adds multiple components to the container. note at once can be added only 1 type of object
Sourcepub fn get_components(&self) -> &[Components]
pub fn get_components(&self) -> &[Components]
Retrieves all components in the container.
Sourcepub fn get_padding(&self) -> &Padding
pub fn get_padding(&self) -> &Padding
Retrieves the padding setting of the container.
Sourcepub fn background_color(self, background_color: BackgroundColor) -> Self
pub fn background_color(self, background_color: BackgroundColor) -> Self
Sets the background color of the container.
Sourcepub fn width_full(self) -> Self
pub fn width_full(self) -> Self
Toggles whether the container occupies the full width.
Sourcepub fn height_full(self) -> Self
pub fn height_full(self) -> Self
Toggles whether the container occupies the full height.
Sourcepub fn border(self, border: BorderStyle) -> Self
pub fn border(self, border: BorderStyle) -> Self
Sets the border properties of the container.
Sourcepub fn border_color(self, border_color: Color) -> Self
pub fn border_color(self, border_color: Color) -> Self
Sets the border color properties of the container.
Sourcepub fn border_radius(self, border_size: Size) -> Self
pub fn border_radius(self, border_size: Size) -> Self
Set the border radius propertie of the container.
Sourcepub fn border_size(self, border_size: BorderPart) -> Self
pub fn border_size(self, border_size: BorderPart) -> Self
Sets the border properties of the container.
Sourcepub fn border_size_full(self, border_size_full: Size) -> Self
pub fn border_size_full(self, border_size_full: Size) -> Self
Sets the border properties size of the container.
Sourcepub fn border_size_l(self, border_size_l: Size) -> Self
pub fn border_size_l(self, border_size_l: Size) -> Self
Set the border size propertie
Sourcepub fn border_size_t(self, border_size_t: Size) -> Self
pub fn border_size_t(self, border_size_t: Size) -> Self
Set the border size propertie
Sourcepub fn border_size_b(self, border_size_b: Size) -> Self
pub fn border_size_b(self, border_size_b: Size) -> Self
Set the border size propertie
Sourcepub fn border_size_r(self, border_size_r: Size) -> Self
pub fn border_size_r(self, border_size_r: Size) -> Self
Set the border size propertie
Sourcepub fn direction(self, direction: Order) -> Self
pub fn direction(self, direction: Order) -> Self
Sets the layout direction of components in the container.
Sourcepub fn align_content(self, align_content: Align) -> Self
pub fn align_content(self, align_content: Align) -> Self
Sets the alignment of content within the container.
Sourcepub fn align_items(self, align_items: Align) -> Self
pub fn align_items(self, align_items: Align) -> Self
Sets the alignment of individual items within the container.
Sourcepub fn get_width_full(&self) -> &bool
pub fn get_width_full(&self) -> &bool
Retrieves the full-width setting of the container.
Sourcepub fn get_height_full(&self) -> &bool
pub fn get_height_full(&self) -> &bool
Retrieves the full-height setting of the container.
Sourcepub fn get_align_content(&self) -> &Align
pub fn get_align_content(&self) -> &Align
Retrieves the alignment of content within the container.
Sourcepub fn get_align_items(&self) -> &Align
pub fn get_align_items(&self) -> &Align
Retrieves the alignment of items within the container.
Sourcepub fn get_background_color(&self) -> &(u8, u8, u8, u8)
pub fn get_background_color(&self) -> &(u8, u8, u8, u8)
Retrieves the background color of the container.
Sourcepub fn get_height(&self) -> &u64
pub fn get_height(&self) -> &u64
Retrieves the height of the container.
Sourcepub fn get_border(&self) -> &BorderStyle
pub fn get_border(&self) -> &BorderStyle
Retrieves the border properties of the container.
Sourcepub fn get_direction(&self) -> &Order
pub fn get_direction(&self) -> &Order
Retrieves the layout direction of the container.