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