pub struct Corners<T> {
pub top_left: T,
pub top_right: T,
pub bottom_left: T,
pub bottom_right: T,
}Expand description
Represents 4 corners of a rectangular shape.
Fields§
§top_left: T§top_right: T§bottom_left: T§bottom_right: TImplementations§
Source§impl<T: Clone> Corners<T>
impl<T: Clone> Corners<T>
pub fn all(value: T) -> Self
pub fn top_bottom(top: T, bottom: T) -> Self
pub fn left_right(left: T, right: T) -> Self
Trait Implementations§
Source§impl<T> From<(T, T, T, T)> for Corners<T>
impl<T> From<(T, T, T, T)> for Corners<T>
Source§fn from((top_left, top_right, bottom_left, bottom_right): (T, T, T, T)) -> Self
fn from((top_left, top_right, bottom_left, bottom_right): (T, T, T, T)) -> Self
Converts to this type from the input type.
impl<T: Copy> Copy for Corners<T>
impl<T: Eq> Eq for Corners<T>
impl<T> StructuralPartialEq for Corners<T>
Auto Trait Implementations§
impl<T> Freeze for Corners<T>where
T: Freeze,
impl<T> RefUnwindSafe for Corners<T>where
T: RefUnwindSafe,
impl<T> Send for Corners<T>where
T: Send,
impl<T> Sync for Corners<T>where
T: Sync,
impl<T> Unpin for Corners<T>where
T: Unpin,
impl<T> UnwindSafe for Corners<T>where
T: UnwindSafe,
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