pub struct LayoutConstraints {
pub min_width: Option<NamedReference>,
pub max_width: Option<NamedReference>,
pub min_height: Option<NamedReference>,
pub max_height: Option<NamedReference>,
pub preferred_width: Option<NamedReference>,
pub preferred_height: Option<NamedReference>,
pub horizontal_stretch: Option<NamedReference>,
pub vertical_stretch: Option<NamedReference>,
pub fixed_width: bool,
pub fixed_height: bool,
}
Fields§
§min_width: Option<NamedReference>
§max_width: Option<NamedReference>
§min_height: Option<NamedReference>
§max_height: Option<NamedReference>
§preferred_width: Option<NamedReference>
§preferred_height: Option<NamedReference>
§horizontal_stretch: Option<NamedReference>
§vertical_stretch: Option<NamedReference>
§fixed_width: bool
§fixed_height: bool
Implementations§
Source§impl LayoutConstraints
impl LayoutConstraints
pub fn new(element: &ElementRc, diag: &mut BuildDiagnostics) -> Self
pub fn has_explicit_restrictions(&self) -> bool
pub fn for_each_restrictions<'a>( &'a self, orientation: Orientation, ) -> impl Iterator<Item = (&NamedReference, &'static str)>
pub fn visit_named_references( &mut self, visitor: &mut impl FnMut(&mut NamedReference), )
Trait Implementations§
Source§impl Clone for LayoutConstraints
impl Clone for LayoutConstraints
Source§fn clone(&self) -> LayoutConstraints
fn clone(&self) -> LayoutConstraints
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 LayoutConstraints
impl Debug for LayoutConstraints
Source§impl Default for LayoutConstraints
impl Default for LayoutConstraints
Source§fn default() -> LayoutConstraints
fn default() -> LayoutConstraints
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LayoutConstraints
impl !RefUnwindSafe for LayoutConstraints
impl !Send for LayoutConstraints
impl !Sync for LayoutConstraints
impl Unpin for LayoutConstraints
impl !UnwindSafe for LayoutConstraints
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