pub struct ConstU8<const V: u8>;Expand description
A const u8.
Deserialization fails if the value is not V.
Trait Implementations§
Source§impl<'de, const V: u8> Deserialize<'de> for ConstU8<V>
impl<'de, const V: u8> Deserialize<'de> for ConstU8<V>
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
Source§impl<const V: u8> Ord for ConstU8<V>
impl<const V: u8> Ord for ConstU8<V>
1.21.0 · 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<const V: u8> PartialOrd for ConstU8<V>
impl<const V: u8> PartialOrd for ConstU8<V>
impl<const V: u8> Copy for ConstU8<V>
impl<const V: u8> Eq for ConstU8<V>
impl<const V: u8> StructuralPartialEq for ConstU8<V>
Auto Trait Implementations§
impl<const V: u8> Freeze for ConstU8<V>
impl<const V: u8> RefUnwindSafe for ConstU8<V>
impl<const V: u8> Send for ConstU8<V>
impl<const V: u8> Sync for ConstU8<V>
impl<const V: u8> Unpin for ConstU8<V>
impl<const V: u8> UnwindSafe for ConstU8<V>
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