pub struct Rect {
pub left: CoordType,
pub top: CoordType,
pub right: CoordType,
pub bottom: CoordType,
}Expand description
A 2D rectangle. Uses CoordType.
Fields§
§left: CoordType§top: CoordType§right: CoordType§bottom: CoordTypeImplementations§
Source§impl Rect
impl Rect
Sourcepub fn one(value: CoordType) -> Self
pub fn one(value: CoordType) -> Self
Mimics CSS’s padding property where padding: a is a a a a.
Sourcepub fn two(top_bottom: CoordType, left_right: CoordType) -> Self
pub fn two(top_bottom: CoordType, left_right: CoordType) -> Self
Mimics CSS’s padding property where padding: a b is a b a b,
and a is top/bottom and b is left/right.
Trait Implementations§
impl Copy for Rect
impl Eq for Rect
impl StructuralPartialEq for Rect
Auto Trait Implementations§
impl Freeze for Rect
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnwindSafe for Rect
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