pub struct FlexboxLayout {
pub elems: Vec<LayoutItem>,
pub geometry: LayoutGeometry,
pub direction: Option<NamedReference>,
pub cross_axis_line_alignment: Option<NamedReference>,
pub cross_axis_alignment: Option<NamedReference>,
pub flex_wrap: Option<NamedReference>,
}Expand description
Internal representation of a FlexboxLayout (row or column direction with wrapping)
Fields§
§elems: Vec<LayoutItem>§geometry: LayoutGeometry§direction: Option<NamedReference>§cross_axis_line_alignment: Option<NamedReference>§cross_axis_alignment: Option<NamedReference>§flex_wrap: Option<NamedReference>Implementations§
Source§impl FlexboxLayout
impl FlexboxLayout
Sourcepub fn from_element(elem: &ElementRc) -> Option<FlexboxLayout>
pub fn from_element(elem: &ElementRc) -> Option<FlexboxLayout>
If elem is a (lowered, inline) FlexboxLayout, return its layout
description. The struct is embedded in the synthesized
layoutinfo-{h,v} / layout-cache bindings on the element.
Sourcepub fn axis_relation(&self, orientation: Orientation) -> FlexboxAxisRelation
pub fn axis_relation(&self, orientation: Orientation) -> FlexboxAxisRelation
Determine the relationship between a queried orientation and this flex’s direction.
pub fn visit_named_references( &mut self, visitor: &mut dyn FnMut(&mut NamedReference), )
Trait Implementations§
Source§impl Clone for FlexboxLayout
impl Clone for FlexboxLayout
Source§fn clone(&self) -> FlexboxLayout
fn clone(&self) -> FlexboxLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FlexboxLayout
impl Debug for FlexboxLayout
Source§impl From<FlexboxLayout> for Layout
impl From<FlexboxLayout> for Layout
Source§fn from(value: FlexboxLayout) -> Self
fn from(value: FlexboxLayout) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FlexboxLayout
impl !Send for FlexboxLayout
impl !Sync for FlexboxLayout
impl !UnwindSafe for FlexboxLayout
impl Freeze for FlexboxLayout
impl Unpin for FlexboxLayout
impl UnsafeUnpin for FlexboxLayout
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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