pub struct LimitsTo<T, const N: usize>(pub T);Available on crate feature
syntax only.Expand description
Accepts T only when its span is at most N units long.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'de, T, const N: usize> Deserialize<'de> for LimitsTo<T, N>where
T: Deserialize<'de>,
impl<'de, T, const N: usize> Deserialize<'de> for LimitsTo<T, N>where
T: Deserialize<'de>,
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> Eq for LimitsTo<T, N>
Source§impl<T: Ord, const N: usize> Ord for LimitsTo<T, N>
impl<T: Ord, const N: usize> Ord for LimitsTo<T, N>
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> PartialOrd for LimitsTo<T, N>
impl<T: PartialOrd, const N: usize> PartialOrd for LimitsTo<T, N>
impl<T: PartialEq, const N: usize> StructuralPartialEq for LimitsTo<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Forget for LimitsTo<T, N>
impl<T, const N: usize> Freeze for LimitsTo<T, N>where
T: Freeze,
impl<T, const N: usize> Move for LimitsTo<T, N>
impl<T, const N: usize> RefUnwindSafe for LimitsTo<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for LimitsTo<T, N>where
T: Send,
impl<T, const N: usize> Sync for LimitsTo<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for LimitsTo<T, N>where
T: Unpin,
impl<T, const N: usize> UnsafeUnpin for LimitsTo<T, N>where
T: UnsafeUnpin,
impl<T, const N: usize> UnwindSafe for LimitsTo<T, N>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