#[repr(C)]pub struct Size {
pub width: i32,
pub height: i32,
}Fields§
§width: i32§height: i32Implementations§
Source§impl Size
impl Size
pub const fn new(width: i32, height: i32) -> Self
pub const fn from_raw_parts(width: i32, height: i32) -> Self
pub fn create(width: i32, height: i32) -> Result<Self>
pub const fn is_positive(self) -> bool
pub fn validate(self) -> Result<()>
pub fn rectangle(self) -> Rectangle
pub fn centered_rectangle(self) -> Rectangle
Trait Implementations§
impl Copy for Size
impl Eq for Size
Source§impl Ord for Size
impl Ord for Size
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Size
impl PartialOrd for Size
impl StructuralPartialEq for Size
Auto Trait Implementations§
impl Freeze for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnsafeUnpin for Size
impl UnwindSafe for Size
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