pub struct VectorWithDefault<T, const N: usize, Policy>where
Policy: Constant<T>,{
pub value: Vector<T, N>,
/* private fields */
}Expand description
Used to define default value, and different deserialization based on a constant for non_exhaustive/missing field.
Fields§
§value: Vector<T, N>Implementations§
Trait Implementations§
Source§impl<T, const N: usize, Policy> AsMut<Vector<T, N>> for VectorWithDefault<T, N, Policy>where
Policy: Constant<T>,
impl<T, const N: usize, Policy> AsMut<Vector<T, N>> for VectorWithDefault<T, N, Policy>where
Policy: Constant<T>,
Source§impl<T, const N: usize, Policy> AsRef<Vector<T, N>> for VectorWithDefault<T, N, Policy>where
Policy: Constant<T>,
impl<T, const N: usize, Policy> AsRef<Vector<T, N>> for VectorWithDefault<T, N, Policy>where
Policy: Constant<T>,
impl<T: Copy, const N: usize, Policy> Copy for VectorWithDefault<T, N, Policy>
Source§impl<T, const N: usize, Policy> Default for VectorWithDefault<T, N, Policy>where
Policy: Constant<T>,
impl<T, const N: usize, Policy> Default for VectorWithDefault<T, N, Policy>where
Policy: Constant<T>,
Source§impl<'de, T, Policy, const N: usize> Deserialize<'de> for VectorWithDefault<T, N, Policy>
impl<'de, T, Policy, const N: usize> Deserialize<'de> for VectorWithDefault<T, N, Policy>
Source§fn 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
impl<T: Eq, const N: usize, Policy> Eq for VectorWithDefault<T, N, Policy>
Source§impl<T, const N: usize, Policy> From<Vector<T, N>> for VectorWithDefault<T, N, Policy>where
Policy: Constant<T>,
impl<T, const N: usize, Policy> From<Vector<T, N>> for VectorWithDefault<T, N, Policy>where
Policy: Constant<T>,
Source§impl<T, const N: usize, Policy> From<VectorWithDefault<T, N, Policy>> for Vector<T, N>where
Policy: Constant<T>,
impl<T, const N: usize, Policy> From<VectorWithDefault<T, N, Policy>> for Vector<T, N>where
Policy: Constant<T>,
Source§fn from(value: VectorWithDefault<T, N, Policy>) -> Self
fn from(value: VectorWithDefault<T, N, Policy>) -> Self
Converts to this type from the input type.
Source§impl<T: Ord, const N: usize, Policy> Ord for VectorWithDefault<T, N, Policy>
impl<T: Ord, const N: usize, Policy> Ord for VectorWithDefault<T, N, Policy>
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T: PartialOrd, const N: usize, Policy> PartialOrd for VectorWithDefault<T, N, Policy>where
Policy: Constant<T> + PartialOrd,
impl<T: PartialOrd, const N: usize, Policy> PartialOrd for VectorWithDefault<T, N, Policy>where
Policy: Constant<T> + PartialOrd,
Source§impl<T, Policy, const N: usize> Serialize for VectorWithDefault<T, N, Policy>
Available on crate feature serde only.
impl<T, Policy, const N: usize> Serialize for VectorWithDefault<T, N, Policy>
Available on crate feature
serde only.impl<T: PartialEq, const N: usize, Policy> StructuralPartialEq for VectorWithDefault<T, N, Policy>
Auto Trait Implementations§
impl<T, const N: usize, Policy> Freeze for VectorWithDefault<T, N, Policy>
impl<T, const N: usize, Policy> RefUnwindSafe for VectorWithDefault<T, N, Policy>
impl<T, const N: usize, Policy> Send for VectorWithDefault<T, N, Policy>
impl<T, const N: usize, Policy> Sync for VectorWithDefault<T, N, Policy>
impl<T, const N: usize, Policy> Unpin for VectorWithDefault<T, N, Policy>
impl<T, const N: usize, Policy> UnsafeUnpin for VectorWithDefault<T, N, Policy>
impl<T, const N: usize, Policy> UnwindSafe for VectorWithDefault<T, N, Policy>
Blanket Implementations§
Source§impl<T> AnyAsync for Twhere
T: Any + WasmSendSync + 'static,
impl<T> AnyAsync for Twhere
T: Any + WasmSendSync + 'static,
impl<T> Async for T
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<S, T> CastRangeInto<T> for Swhere
T: CastRangeFrom<S>,
impl<S, T> CastRangeInto<T> for Swhere
T: CastRangeFrom<S>,
fn cast_range_into(self) -> T
impl<'de, T> CfgDeserialize<'de> for Twhere
T: Deserialize<'de> + ?Sized,
impl<T> CfgSerialize for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DefaultExtension for T
impl<T> DefaultExtension for T
fn is_default(&self) -> bool
fn is_not_default(&self) -> bool
Source§impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
impl<T> DefaultIsTripleUnderscore for Twhere
T: Default,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 moreSource§impl<T> PartialOrdExtension for Twhere
T: PartialOrd,
impl<T> PartialOrdExtension for Twhere
T: PartialOrd,
Source§fn max_partial(self, other: Self) -> Selfwhere
Self: Sized,
fn max_partial(self, other: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wiseSource§fn min_partial(self, other: Self) -> Selfwhere
Self: Sized,
fn min_partial(self, other: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wiseSource§fn clamp_partial(self, min: Self, max: Self) -> Selfwhere
Self: Sized,
fn clamp_partial(self, min: Self, max: Self) -> Selfwhere
Self: Sized,
Using
PartialOrd operator, not component wise