pub struct ContainerStyle {
pub display: Display,
pub direction: Direction,
pub wrap: bool,
pub justify: Justify,
pub align: Align,
pub align_content: Option<Justify>,
pub gap: (f32, f32),
pub cols: Option<u16>,
}Expand description
The layout attributes of a container (<View>), as a flex/grid parent.
Fields§
§display: Displaydisplay.
direction: Directionflex-direction.
wrap: boolflex-wrap.
justify: Justifyjustify-content.
align: Alignalign-items.
align_content: Option<Justify>align-content.
gap: (f32, f32)column-gap and row-gap, in points.
cols: Option<u16>Number of equal-width grid columns, for display="grid".
Implementations§
Source§impl ContainerStyle
impl ContainerStyle
Sourcepub fn align_content(self, v: impl Into<Justify>) -> Self
pub fn align_content(self, v: impl Into<Justify>) -> Self
Set align-content.
Trait Implementations§
Source§impl Clone for ContainerStyle
impl Clone for ContainerStyle
Source§fn clone(&self) -> ContainerStyle
fn clone(&self) -> ContainerStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerStyle
impl Debug for ContainerStyle
Source§impl Default for ContainerStyle
impl Default for ContainerStyle
Source§fn default() -> ContainerStyle
fn default() -> ContainerStyle
Returns the “default value” for a type. Read more
Source§impl PartialEq for ContainerStyle
impl PartialEq for ContainerStyle
impl StructuralPartialEq for ContainerStyle
Auto Trait Implementations§
impl Freeze for ContainerStyle
impl RefUnwindSafe for ContainerStyle
impl Send for ContainerStyle
impl Sync for ContainerStyle
impl Unpin for ContainerStyle
impl UnsafeUnpin for ContainerStyle
impl UnwindSafe for ContainerStyle
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more