pub struct SubcomposeScope {
pub min_width: Dp,
pub max_width: Dp,
pub min_height: Dp,
pub max_height: Dp,
}Expand description
The constraints that will be passed to a subcomposed child. Values are in
Dp, matching the units used by Modifier.
Fields§
§min_width: Dp§max_width: Dp§min_height: Dp§max_height: DpImplementations§
Source§impl SubcomposeScope
impl SubcomposeScope
Sourcepub const UNBOUNDED: Self
pub const UNBOUNDED: Self
A scope with no finite upper bounds. Values are density-independent
pixels (Dp).
Sourcepub fn new(min_width: Dp, max_width: Dp, min_height: Dp, max_height: Dp) -> Self
pub fn new(min_width: Dp, max_width: Dp, min_height: Dp, max_height: Dp) -> Self
Construct a scope from raw min/max Dp values. Non-finite minimums
and negative values are coerced to zero, a NaN maximum becomes
unbounded, and inverted bounds collapse to the maximum.
pub fn has_bounded_width(&self) -> bool
pub fn has_bounded_height(&self) -> bool
Trait Implementations§
Source§impl Clone for SubcomposeScope
impl Clone for SubcomposeScope
impl Copy for SubcomposeScope
Source§impl Debug for SubcomposeScope
impl Debug for SubcomposeScope
Source§impl PartialEq for SubcomposeScope
impl PartialEq for SubcomposeScope
impl StructuralPartialEq for SubcomposeScope
Auto Trait Implementations§
impl Freeze for SubcomposeScope
impl RefUnwindSafe for SubcomposeScope
impl Send for SubcomposeScope
impl Sync for SubcomposeScope
impl Unpin for SubcomposeScope
impl UnsafeUnpin for SubcomposeScope
impl UnwindSafe for SubcomposeScope
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