pub struct Constraints {
pub width: Dimension,
pub height: Dimension,
pub valign: VerticalAlignment,
pub halign: HorizontalAlignment,
pub child_orientation: ChildOrientation,
}
Expand description
Specifies the size constraints for a widget
Fields
width: Dimension
height: Dimension
valign: VerticalAlignment
halign: HorizontalAlignment
child_orientation: ChildOrientation
Implementations
sourceimpl Constraints
impl Constraints
pub fn with_fixed_width_height(width: u16, height: u16) -> Self
pub fn set_fixed_width(&mut self, width: u16) -> &mut Self
pub fn set_pct_width(&mut self, width: u8) -> &mut Self
pub fn set_fixed_height(&mut self, height: u16) -> &mut Self
pub fn set_pct_height(&mut self, height: u8) -> &mut Self
pub fn set_valign(&mut self, valign: VerticalAlignment) -> &mut Self
pub fn set_halign(&mut self, halign: HorizontalAlignment) -> &mut Self
Trait Implementations
sourceimpl Clone for Constraints
impl Clone for Constraints
sourcefn clone(&self) -> Constraints
fn clone(&self) -> Constraints
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Constraints
impl Debug for Constraints
sourceimpl Default for Constraints
impl Default for Constraints
sourcefn default() -> Constraints
fn default() -> Constraints
Returns the “default value” for a type. Read more
sourceimpl PartialEq<Constraints> for Constraints
impl PartialEq<Constraints> for Constraints
sourcefn eq(&self, other: &Constraints) -> bool
fn eq(&self, other: &Constraints) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Constraints) -> bool
fn ne(&self, other: &Constraints) -> bool
This method tests for !=
.
impl Copy for Constraints
impl Eq for Constraints
impl StructuralEq for Constraints
impl StructuralPartialEq for Constraints
Auto Trait Implementations
impl RefUnwindSafe for Constraints
impl Send for Constraints
impl Sync for Constraints
impl Unpin for Constraints
impl UnwindSafe for Constraints
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more