pub struct Point2D<T> {
pub x: T,
pub y: T,
}Fields§
§x: T§y: TImplementations§
source§impl<Unit, T: Clone> Point2D<Length<Unit, T>>
impl<Unit, T: Clone> Point2D<Length<Unit, T>>
pub fn typed(x: T, y: T) -> TypedPoint2D<Unit, T>
sourcepub fn to_untyped(&self) -> Point2D<T>
pub fn to_untyped(&self) -> Point2D<T>
Drop the units, preserving only the numeric value.
sourcepub fn from_untyped(p: &Point2D<T>) -> TypedPoint2D<Unit, T>
pub fn from_untyped(p: &Point2D<T>) -> TypedPoint2D<Unit, T>
Tag a unitless value with units.
Trait Implementations§
source§impl<T: PartialEq> PartialEq for Point2D<T>
impl<T: PartialEq> PartialEq for Point2D<T>
impl<T: Copy> Copy for Point2D<T>
impl<T: Eq> Eq for Point2D<T>
impl<T> StructuralPartialEq for Point2D<T>
Auto Trait Implementations§
impl<T> Freeze for Point2D<T>where
T: Freeze,
impl<T> RefUnwindSafe for Point2D<T>where
T: RefUnwindSafe,
impl<T> Send for Point2D<T>where
T: Send,
impl<T> Sync for Point2D<T>where
T: Sync,
impl<T> Unpin for Point2D<T>where
T: Unpin,
impl<T> UnwindSafe for Point2D<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)