Struct shape_core::Point
source · [−]pub struct Point<T> {
pub x: T,
pub y: T,
}
Expand description
A 2D point.
Fields
x: T
y: T
Implementations
Trait Implementations
sourceimpl<'de, T> Deserialize<'de> for Point<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Point<T> where
T: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T> Distance<T, Point<T>> for Point<T> where
T: Clone + Real,
impl<T> Distance<T, Point<T>> for Point<T> where
T: Clone + Real,
fn distance_to(&self, other: &Self) -> T
sourceimpl<T> Projective<T> for Point<T> where
T: Real,
impl<T> Projective<T> for Point<T> where
T: Real,
sourcefn translate_x(&mut self, x: &T)
fn translate_x(&mut self, x: &T)
Transform by length $\delta x$. Read more
sourcefn translate_y(&mut self, y: &T)
fn translate_y(&mut self, y: &T)
Transform by length $\delta y$. Read more
impl<T: Copy> Copy for Point<T>
impl<T: Eq> Eq for Point<T>
impl<T> StructuralEq for Point<T>
impl<T> StructuralPartialEq for Point<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Point<T> where
T: RefUnwindSafe,
impl<T> Send for Point<T> where
T: Send,
impl<T> Sync for Point<T> where
T: Sync,
impl<T> Unpin for Point<T> where
T: Unpin,
impl<T> UnwindSafe for Point<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more