pub struct Container {
pub element_data: ElementData,
}Expand description
An element for storing related elements.
Fields§
§element_data: ElementDataImplementations§
Source§impl Container
impl Container
pub fn new() -> Container
pub fn component(self) -> ComponentSpecification
pub fn key(self, key: &str) -> Self
pub fn props(self, props: Props) -> Self
pub fn id(self, id: &str) -> Self
pub fn hovered(self) -> Self
pub fn pressed(self) -> Self
pub fn disabled(self) -> Self
pub fn focused(self) -> Self
pub fn push<T>(self, component_specification: T) -> Selfwhere
T: Into<ComponentSpecification>,
pub fn push_children<T>(self, children: Vec<T>) -> Selfwhere
T: Into<ComponentSpecification>,
pub fn extend_children<T>(self, children: Vec<T>) -> Selfwhere
T: Into<ComponentSpecification>,
pub fn push_in_place(&mut self, component_specification: ComponentSpecification)
pub fn normal(self) -> Self
Trait Implementations§
Source§impl ElementStyles for Container
impl ElementStyles for Container
fn styles_mut(&mut self) -> &mut Style
fn background(self, color: Color) -> Self
fn margin<U: Into<Unit>>(self, top: U, right: U, bottom: U, left: U) -> Self
fn padding<U: Into<Unit>>(self, top: U, right: U, bottom: U, left: U) -> Self
fn border_width<U: Into<Unit>>( self, top: U, right: U, bottom: U, left: U, ) -> Self
fn border_radius<U: Into<f32> + Copy>( self, top: U, right: U, bottom: U, left: U, ) -> Self
fn border_color(self, color: Color) -> Self
fn border_color_top(self, color: Color) -> Self
fn border_color_right(self, color: Color) -> Self
fn border_color_bottom(self, color: Color) -> Self
fn border_color_left(self, color: Color) -> Self
fn display(self, display: Display) -> Self
fn wrap(self, wrap: Wrap) -> Self
fn justify_content(self, justify_content: JustifyContent) -> Self
fn align_items(self, align_items: AlignItems) -> Self
fn flex_direction(self, flex_direction: FlexDirection) -> Self
fn flex_grow(self, flex_grow: f32) -> Self
fn flex_shrink(self, flex_shrink: f32) -> Self
fn flex_basis<U: Into<Unit>>(self, flex_basis: U) -> Self
fn width<U: Into<Unit>>(self, width: U) -> Self
fn height<U: Into<Unit>>(self, height: U) -> Self
fn max_width<U: Into<Unit>>(self, max_width: U) -> Self
fn max_height<U: Into<Unit>>(self, max_height: U) -> Self
fn min_width<U: Into<Unit>>(self, min_width: U) -> Self
fn min_height<U: Into<Unit>>(self, min_height: U) -> Self
fn overflow_x(self, overflow: Overflow) -> Self
fn overflow_y(self, overflow: Overflow) -> Self
fn color(self, color: Color) -> Self
fn font_family(self, font_family: &str) -> Self
fn font_size(self, font_size: f32) -> Self
fn font_weight(self, font_weight: Weight) -> Self
fn font_style(self, font_style: FontStyle) -> Self
fn overflow(self, overflow: Overflow) -> Self
fn position(self, position: Position) -> Self
fn inset<U: Into<Unit>>(self, top: U, right: U, bottom: U, left: U) -> Self
fn scrollbar_width(self, scrollbar_width: f32) -> Self
fn box_sizing(self, box_sizing: BoxSizing) -> Self
fn gap<U: Into<Unit> + Clone>(self, gap: U) -> Self
fn row_gap<U: Into<Unit>>(self, row_gap: U) -> Self
fn column_gap<U: Into<Unit>>(self, column_gap: U) -> Self
fn scrollbar_color( self, scroll_thumb_color: Color, scroll_track_color: Color, ) -> Self
fn visible(self, visible: bool) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Container
impl !UnwindSafe for Container
impl Freeze for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.