pub struct Coord<TSpace> {
pub x: f64,
pub y: f64,
/* private fields */
}Expand description
A 2D coordinate with a type-level marker for the coordinate space.
The TSpace parameter should be either Pixel or
Normalized, ensuring that coordinates from
different spaces cannot be accidentally mixed.
Fields§
§x: f64§y: f64Implementations§
Trait Implementations§
impl<TSpace: Copy> Copy for Coord<TSpace>
Source§impl<'de, TSpace> Deserialize<'de> for Coord<TSpace>
impl<'de, TSpace> Deserialize<'de> for Coord<TSpace>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<TSpace: PartialEq> StructuralPartialEq for Coord<TSpace>
Auto Trait Implementations§
impl<TSpace> Freeze for Coord<TSpace>
impl<TSpace> RefUnwindSafe for Coord<TSpace>where
TSpace: RefUnwindSafe,
impl<TSpace> Send for Coord<TSpace>where
TSpace: Send,
impl<TSpace> Sync for Coord<TSpace>where
TSpace: Sync,
impl<TSpace> Unpin for Coord<TSpace>where
TSpace: Unpin,
impl<TSpace> UnsafeUnpin for Coord<TSpace>
impl<TSpace> UnwindSafe for Coord<TSpace>where
TSpace: 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