pub struct PosC<T> {
pub coords: [T; 2],
}Fields§
§coords: [T; 2]Implementations§
Source§impl<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>
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,
Source§impl<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§
Source§impl<T> Add for PosC<T>where
T: CheckedArith,
impl<T> Add for PosC<T>where
T: CheckedArith,
Source§impl<'de, T> Deserialize<'de> for PosC<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for PosC<T>where
T: Deserialize<'de>,
Source§fn 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
Source§impl<T> Neg for PosC<T>where
T: CheckedArith,
impl<T> Neg for PosC<T>where
T: CheckedArith,
Source§impl<T> Ord for PosC<T>where
T: Ord,
impl<T> Ord for PosC<T>where
T: Ord,
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialOrd for PosC<T>where
T: PartialOrd,
impl<T> PartialOrd for PosC<T>where
T: PartialOrd,
Source§impl<T> PosPromote for PosC<T>
impl<T> PosPromote for PosC<T>
Source§impl<T> Serialize for PosC<T>where
T: Serialize,
impl<T> Serialize for PosC<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
Source§impl<T> Sub for PosC<T>where
T: CheckedArith,
impl<T> Sub 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> StructuralPartialEq for PosC<T>
Auto Trait Implementations§
impl<T> Freeze for PosC<T>where
T: Freeze,
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> UnsafeUnpin for PosC<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for PosC<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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more