pub struct Size { /* private fields */ }Implementations§
Source§impl Size
impl Size
pub const EMPTY: Size
pub fn new(width: u16, height: u16) -> Size
pub fn width(&self) -> u16
pub fn height(&self) -> u16
pub fn set_width(&mut self, width: u16)
pub fn set_height(&mut self, height: u16)
pub fn is_empty(&self) -> bool
pub fn contains(&self, position: Position) -> bool
pub fn exceed(&self, other: Size) -> bool
pub fn clip(&self, other: Size) -> Size
pub fn sub_margin(self, margin: &Margin) -> Size
pub fn add_margin(self, margin: &Margin) -> Size
Trait Implementations§
impl Copy for Size
impl Eq 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