Struct panoramix::flex::FlexParams[][src]

pub struct FlexParams {
    pub flex: f64,
    pub alignment: Option<CrossAxisAlignment>,
}

Optional parameters for an item in a Flex container (row or column).

Elements that represent a single flex item generally have a with_flex_params method that you can pass this struct to.

Fields

flex: f64alignment: Option<CrossAxisAlignment>

Implementations

impl FlexParams[src]

pub fn new(flex: f64, alignment: impl Into<Option<CrossAxisAlignment>>) -> Self[src]

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

impl Clone for FlexParams[src]

impl Copy for FlexParams[src]

impl Debug for FlexParams[src]

impl Default for FlexParams[src]

impl From<f64> for FlexParams[src]

impl PartialEq<FlexParams> for FlexParams[src]

impl StructuralPartialEq for FlexParams[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AnyEq for T where
    T: Any + PartialEq<T>, 

impl<T> AnyState for T where
    T: Clone + Default + Debug + PartialEq<T> + 'static, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.