#[repr(C)]pub struct Point<T> {
pub x: T,
pub y: T,
}Expand description
A point: x to the right, y down, from the origin of what it is
relative to.
Fields§
§x: TThe horizontal coordinate.
y: TThe vertical coordinate.
Implementations§
Source§impl<T> Point<T>where
T: Clone + PartialOrd,
impl<T> Point<T>where
T: Clone + PartialOrd,
Trait Implementations§
Source§impl<T> AddAssign for Point<T>where
T: AddAssign,
impl<T> AddAssign for Point<T>where
T: AddAssign,
Source§fn add_assign(&mut self, rhs: Point<T>)
fn add_assign(&mut self, rhs: Point<T>)
Performs the
+= operation. Read moreimpl<T> Copy for Point<T>where
T: Copy,
Source§impl<'de, T> Deserialize<'de> for Point<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Point<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Point<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Point<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T> Eq for Point<T>where
T: Eq,
Source§impl JsValue for Point<Points>
A position in points: TS’s Point ({ x, y }), as events carry it.
impl JsValue for Point<Points>
A position in points: TS’s Point ({ x, y }), as events carry it.
Source§impl<T, S> MulAssign<S> for Point<T>
impl<T, S> MulAssign<S> for Point<T>
Source§fn mul_assign(&mut self, rhs: S)
fn mul_assign(&mut self, rhs: S)
Performs the
*= operation. Read moreSource§impl<Cx> OpArg<Cx> for Point<Points>
A point: two arguments, x then y.
impl<Cx> OpArg<Cx> for Point<Points>
A point: two arguments, x then y.
Source§impl<T> Serialize for Point<T>where
T: Serialize,
impl<T> Serialize for Point<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> StructuralPartialEq for Point<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Freeze for Point<T>where
T: Freeze,
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> UnsafeUnpin for Point<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Point<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> CallbackArgs for Twhere
T: Ret,
impl<T> CallbackArgs for Twhere
T: Ret,
Source§fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
fn ts_params(types: &mut TsTypes, names: &[&str]) -> String
Its TypeScript parameters, named
names (name: string, amount: number), or without names value for one and a, b, … for
several.Source§fn into_js_args<'a>(
self,
host: &'a dyn JsHost,
) -> Result<Vec<JsOwned<'a>>, PropError>
fn into_js_args<'a>( self, host: &'a dyn JsHost, ) -> Result<Vec<JsOwned<'a>>, PropError>
The arguments as JS values.
fn classes(out: &mut Vec<&'static ClassDef>)
Source§impl<T> CallbackRet for Twhere
T: JsValue,
impl<T> CallbackRet for Twhere
T: JsValue,
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.