pub struct BoxConstraints {
pub min: Vec2,
pub max: Vec2,
}
Fields§
§min: Vec2
§max: Vec2
Implementations§
Source§impl BoxConstraints
impl BoxConstraints
pub const UNBOUNDED: Self
pub fn new(min: Vec2, max: Vec2) -> Self
pub fn window(width: u32, height: u32) -> Self
pub fn loose(self) -> Self
pub fn loose_x(self) -> Self
pub fn loose_y(self) -> Self
pub fn shrink(self, size: Vec2) -> Self
pub fn constrain(self, size: Vec2) -> Vec2
pub fn height(self) -> Range<f32>
pub fn width(self) -> Range<f32>
Trait Implementations§
Source§impl Clone for BoxConstraints
impl Clone for BoxConstraints
Source§fn clone(&self) -> BoxConstraints
fn clone(&self) -> BoxConstraints
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BoxConstraints
impl Debug for BoxConstraints
Source§impl PartialEq for BoxConstraints
impl PartialEq for BoxConstraints
impl Copy for BoxConstraints
impl StructuralPartialEq for BoxConstraints
Auto Trait Implementations§
impl Freeze for BoxConstraints
impl RefUnwindSafe for BoxConstraints
impl Send for BoxConstraints
impl Sync for BoxConstraints
impl Unpin for BoxConstraints
impl UnwindSafe for BoxConstraints
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Styleable<T> for T
impl<T> Styleable<T> for T
Source§fn styled(self) -> Styled<T>
fn styled(self) -> Styled<T>
Converts the
self
into a Styled<Self>
value.Source§fn attr_trans(
self,
key: &str,
value: impl Into<StyleAttributeValue>,
transition: impl Into<StyleTransition>,
) -> Styled<T>
fn attr_trans( self, key: &str, value: impl Into<StyleAttributeValue>, transition: impl Into<StyleTransition>, ) -> Styled<T>
Adds an attribute with a transition.