pub struct LayoutSize {
pub width: LayoutUnit,
pub height: LayoutUnit,
}Expand description
A 2D size in layout coordinate space.
Represents a width and height in logical pixels. Used as the output of layout measurement and as input to constraints.
Fields§
§width: LayoutUnitWidth in logical pixels.
height: LayoutUnitHeight in logical pixels.
Implementations§
Source§impl LayoutSize
impl LayoutSize
Sourcepub fn new(width: LayoutUnit, height: LayoutUnit) -> Self
pub fn new(width: LayoutUnit, height: LayoutUnit) -> Self
Creates a new size from width and height values.
Trait Implementations§
Source§impl Clone for LayoutSize
impl Clone for LayoutSize
Source§fn clone(&self) -> LayoutSize
fn clone(&self) -> LayoutSize
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 LayoutSize
impl Debug for LayoutSize
Source§impl Default for LayoutSize
impl Default for LayoutSize
Source§fn default() -> LayoutSize
fn default() -> LayoutSize
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LayoutSize
impl<'de> Deserialize<'de> for LayoutSize
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for LayoutSize
impl PartialEq for LayoutSize
Source§impl Serialize for LayoutSize
impl Serialize for LayoutSize
impl Copy for LayoutSize
impl StructuralPartialEq for LayoutSize
Auto Trait Implementations§
impl Freeze for LayoutSize
impl RefUnwindSafe for LayoutSize
impl Send for LayoutSize
impl Sync for LayoutSize
impl Unpin for LayoutSize
impl UnsafeUnpin for LayoutSize
impl UnwindSafe for LayoutSize
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