pub struct PermissiveBool;
Expand description
Permissively deserializes a boolean.
This helper module allows deserializing a bool
from a number of possible data types:
true
orfalse
as a native boolean"true"
or"false"
as a string (case insensitive)1
or0
as an integer (signed, unsigned, or floating point)
Trait Implementations§
Source§impl<'de> DeserializeAs<'de, bool> for PermissiveBool
impl<'de> DeserializeAs<'de, bool> for PermissiveBool
Source§fn deserialize_as<D>(deserializer: D) -> Result<bool, D::Error>where
D: Deserializer<'de>,
fn deserialize_as<D>(deserializer: D) -> Result<bool, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer.
Auto Trait Implementations§
impl Freeze for PermissiveBool
impl RefUnwindSafe for PermissiveBool
impl Send for PermissiveBool
impl Sync for PermissiveBool
impl Unpin for PermissiveBool
impl UnwindSafe for PermissiveBool
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Instruments this type by attaching the given allocation group token, returning a
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Instruments this type by attaching the current allocation group, returning a
Tracked
wrapper. Read more