pub struct BoxWithConstraintsScopeImpl { /* private fields */ }Expand description
Concrete implementation of BoxWithConstraintsScope.
Implementations§
Source§impl BoxWithConstraintsScopeImpl
impl BoxWithConstraintsScopeImpl
Sourcepub fn new(constraints: Constraints) -> Self
pub fn new(constraints: Constraints) -> Self
Creates a scope for constraints at a density of 1.0, where one dp is one pixel.
Sourcepub fn with_density(constraints: Constraints, density: f32) -> Self
pub fn with_density(constraints: Constraints, density: f32) -> Self
Creates a scope for constraints where one dp is density pixels.
Trait Implementations§
Source§impl BoxWithConstraintsScope for BoxWithConstraintsScopeImpl
impl BoxWithConstraintsScope for BoxWithConstraintsScopeImpl
Source§fn constraints(&self) -> Constraints
fn constraints(&self) -> Constraints
Returns the constraints that the parent passed to the layout, in pixels.
Source§fn max_width(&self) -> Dp
fn max_width(&self) -> Dp
Returns the maximum width constraint as a
Dp. Infinite when the width is unbounded.Source§fn min_height(&self) -> Dp
fn min_height(&self) -> Dp
Returns the minimum height constraint as a
Dp.Source§fn max_height(&self) -> Dp
fn max_height(&self) -> Dp
Returns the maximum height constraint as a
Dp. Infinite when the height is unbounded.Source§impl Clone for BoxWithConstraintsScopeImpl
impl Clone for BoxWithConstraintsScopeImpl
impl Copy for BoxWithConstraintsScopeImpl
Source§impl Debug for BoxWithConstraintsScopeImpl
impl Debug for BoxWithConstraintsScopeImpl
impl StructuralPartialEq for BoxWithConstraintsScopeImpl
Auto Trait Implementations§
impl Freeze for BoxWithConstraintsScopeImpl
impl RefUnwindSafe for BoxWithConstraintsScopeImpl
impl Send for BoxWithConstraintsScopeImpl
impl Sync for BoxWithConstraintsScopeImpl
impl Unpin for BoxWithConstraintsScopeImpl
impl UnsafeUnpin for BoxWithConstraintsScopeImpl
impl UnwindSafe for BoxWithConstraintsScopeImpl
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