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 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: Vec<impl Into<Components>>) -> Self
pub fn components(self, components: Vec<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 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) -> &(u64, (u8, u8, u8, u8), u64)
pub fn get_border(&self) -> &(u64, (u8, u8, u8, u8), u64)
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.