pub struct StretchSize {
pub size: LayoutSize,
pub fills_width: bool,
pub fills_height: bool,
}Fields§
§size: LayoutSize§fills_width: bool§fills_height: boolImplementations§
Source§impl StretchSize
impl StretchSize
Sourcepub fn resolve(self, prim_rect: &LayoutRect) -> LayoutSize
pub fn resolve(self, prim_rect: &LayoutRect) -> LayoutSize
Resolve to the LayoutSize used for the GPU shader and tiling math.
Per-axis: an axis flagged fills_* resolves to the snapped prim
rect’s extent on that axis; the other axis keeps the stored size.
Trait Implementations§
Source§impl Clone for StretchSize
impl Clone for StretchSize
Source§fn clone(&self) -> StretchSize
fn clone(&self) -> StretchSize
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 StretchSize
impl Debug for StretchSize
Source§impl From<StretchSizeKey> for StretchSize
impl From<StretchSizeKey> for StretchSize
Source§fn from(k: StretchSizeKey) -> Self
fn from(k: StretchSizeKey) -> Self
Converts to this type from the input type.
Source§impl MallocSizeOf for StretchSize
impl MallocSizeOf for StretchSize
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl Serialize for StretchSize
impl Serialize for StretchSize
impl Copy for StretchSize
Auto Trait Implementations§
impl Freeze for StretchSize
impl RefUnwindSafe for StretchSize
impl Send for StretchSize
impl Sync for StretchSize
impl Unpin for StretchSize
impl UnsafeUnpin for StretchSize
impl UnwindSafe for StretchSize
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