Struct masonry::widget::FlexParams
source · pub struct FlexParams { /* private fields */ }
Expand description
Optional parameters for an item in a Flex
container (row or column).
Generally, when you would like to add a flexible child to a container,
you can simply call with_flex_child
, passing the
child and the desired flex factor as a f64
, which has an impl of
Into<FlexParams>
.
Implementations§
source§impl FlexParams
impl FlexParams
sourcepub fn new(flex: f64, alignment: impl Into<Option<CrossAxisAlignment>>) -> Self
pub fn new(flex: f64, alignment: impl Into<Option<CrossAxisAlignment>>) -> Self
Create custom FlexParams
with a specific flex_factor
and an optional
CrossAxisAlignment
.
You likely only need to create these manually if you need to specify
a custom alignment; if you only need to use a custom flex_factor
you
can pass an f64
to any of the functions that take FlexParams
.
By default, the widget uses the alignment of its parent Flex
container.
Trait Implementations§
source§impl Clone for FlexParams
impl Clone for FlexParams
source§fn clone(&self) -> FlexParams
fn clone(&self) -> FlexParams
Returns a copy 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 FlexParams
impl Debug for FlexParams
source§impl From<f64> for FlexParams
impl From<f64> for FlexParams
source§fn from(flex: f64) -> FlexParams
fn from(flex: f64) -> FlexParams
Converts to this type from the input type.
source§impl PartialEq for FlexParams
impl PartialEq for FlexParams
source§fn eq(&self, other: &FlexParams) -> bool
fn eq(&self, other: &FlexParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for FlexParams
impl StructuralPartialEq for FlexParams
Auto Trait Implementations§
impl Freeze for FlexParams
impl RefUnwindSafe for FlexParams
impl Send for FlexParams
impl Sync for FlexParams
impl Unpin for FlexParams
impl UnwindSafe for FlexParams
Blanket Implementations§
source§impl<T> AsAny for Twhere
T: Any,
impl<T> AsAny for Twhere
T: Any,
source§fn as_dyn_any(&self) -> &(dyn Any + 'static)
fn as_dyn_any(&self) -> &(dyn Any + 'static)
Return self.
source§fn as_mut_dyn_any(&mut self) -> &mut (dyn Any + 'static)
fn as_mut_dyn_any(&mut self) -> &mut (dyn Any + 'static)
Return self.
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