pub struct FlexItem {
pub grow: f32,
pub shrink: f32,
pub basis: FlexBasis,
pub min_size: Size,
pub max_size: Size,
pub align_self: Option<Alignment>,
}Fields§
§grow: f32§shrink: f32§basis: FlexBasis§min_size: Size§max_size: Size§align_self: Option<Alignment>Implementations§
Source§impl FlexItem
impl FlexItem
pub const fn new() -> FlexItem
pub const fn fill() -> FlexItem
pub fn flex(grow: f32) -> FlexItem
pub fn fixed(basis: f32) -> FlexItem
pub fn grow(self, grow: f32) -> FlexItem
pub fn shrink(self, shrink: f32) -> FlexItem
pub fn no_shrink(self) -> FlexItem
pub fn basis(self, basis: f32) -> FlexItem
pub fn basis_fraction(self, fraction: f32) -> FlexItem
pub fn basis_gap_aware_fraction(self, fraction: f32) -> FlexItem
pub fn auto_basis(self) -> FlexItem
pub fn min_size(self, min_size: Size) -> FlexItem
pub fn min_width(self, min_width: f32) -> FlexItem
pub fn min_height(self, min_height: f32) -> FlexItem
pub fn max_size(self, max_size: Size) -> FlexItem
pub fn max_width(self, max_width: f32) -> FlexItem
pub fn max_height(self, max_height: f32) -> FlexItem
pub fn align_self(self, alignment: Alignment) -> FlexItem
pub fn inherit_alignment(self) -> FlexItem
Trait Implementations§
impl Copy for FlexItem
impl StructuralPartialEq for FlexItem
Auto Trait Implementations§
impl Forget for FlexItem
impl Freeze for FlexItem
impl Move for FlexItem
impl RefUnwindSafe for FlexItem
impl Send for FlexItem
impl Sync for FlexItem
impl Unpin for FlexItem
impl UnsafeUnpin for FlexItem
impl UnwindSafe for FlexItem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.