Struct otter_support::prelude::PosC
source · [−]Fields
coords: [T; 2]
Implementations
sourceimpl<T> PosC<T>
impl<T> PosC<T>
pub const fn new(x: T, y: T) -> PosC<T>
pub fn both(v: T) -> PosC<T> where
T: Copy,
pub fn zero() -> PosC<T> where
T: Zero + Copy,
pub fn coords(self) -> impl ExactSizeIterator + FusedIterator
pub fn len2(self) -> Result<f64, CoordinateOverflow> where
PosC<T>: PosPromote,
pub fn len(self) -> Result<f64, CoordinateOverflow> where
PosC<T>: PosPromote,
sourceimpl<T> PosC<T> where
T: Debug,
impl<T> PosC<T> where
T: Debug,
pub fn from_iter_2<I>(i: I) -> PosC<T> where
I: Iterator<Item = T>,
Trait Implementations
sourceimpl<T> Add<PosC<T>> for PosC<T> where
T: CheckedArith,
impl<T> Add<PosC<T>> for PosC<T> where
T: CheckedArith,
sourceimpl<'de, T> Deserialize<'de> for PosC<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for PosC<T> where
T: Deserialize<'de>,
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<PosC<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<PosC<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<S, T> Mul<S> for PosC<T> where
S: 'static + Copy + Debug + Clone,
T: CheckedArithMul<S>,
impl<S, T> Mul<S> for PosC<T> where
S: 'static + Copy + Debug + Clone,
T: CheckedArithMul<S>,
type Output = Result<PosC<T>, CoordinateOverflow>
type Output = Result<PosC<T>, CoordinateOverflow>
The resulting type after applying the *
operator.
sourceimpl<T> Neg for PosC<T> where
T: CheckedArith,
impl<T> Neg for PosC<T> where
T: CheckedArith,
type Output = Result<PosC<T>, CoordinateOverflow>
type Output = Result<PosC<T>, CoordinateOverflow>
The resulting type after applying the -
operator.
sourceimpl<T> Ord for PosC<T> where
T: Ord,
impl<T> Ord for PosC<T> where
T: Ord,
sourceimpl<T> PartialOrd<PosC<T>> for PosC<T> where
T: PartialOrd<T>,
impl<T> PartialOrd<PosC<T>> for PosC<T> where
T: PartialOrd<T>,
sourcefn partial_cmp(&self, other: &PosC<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &PosC<T>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<T> Serialize for PosC<T> where
T: Serialize,
impl<T> Serialize for PosC<T> where
T: Serialize,
sourcefn 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
sourceimpl<T> Sub<PosC<T>> for PosC<T> where
T: CheckedArith,
impl<T> Sub<PosC<T>> for PosC<T> where
T: CheckedArith,
impl<T> Copy for PosC<T> where
T: Copy,
impl<T> Eq for PosC<T> where
T: Eq,
impl<T> StructuralEq for PosC<T>
impl<T> StructuralPartialEq for PosC<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for PosC<T> where
T: RefUnwindSafe,
impl<T> Send for PosC<T> where
T: Send,
impl<T> Sync for PosC<T> where
T: Sync,
impl<T> Unpin for PosC<T> where
T: Unpin,
impl<T> UnwindSafe for PosC<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