pub enum Strictness {
Strict,
Lenient,
}Expand description
The mode of operation when parsing and checking values for validity.
Variants§
Strict
Only accept known formats exact to the byte, and only value ranges last known to be valid. Should normally be used.
Lenient
Turn a blind eye regarding certain aspects when parsing or checking values for validity. Can be tried when strict mode doesn’t work, or when you must overcome certain limitations. Doesn’t influence serialization. Rather than this being used regularly, the parsing or other code should be updated.
Implementations§
Source§impl Strictness
impl Strictness
pub fn from_lenient_bool(lenient: bool) -> Self
pub fn is_strict(&self) -> bool
pub fn is_lenient(&self) -> bool
Trait Implementations§
Source§impl Clone for Strictness
impl Clone for Strictness
Source§fn clone(&self) -> Strictness
fn clone(&self) -> Strictness
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Strictness
impl Debug for Strictness
Source§impl PartialEq for Strictness
impl PartialEq for Strictness
impl Copy for Strictness
impl StructuralPartialEq for Strictness
Auto Trait Implementations§
impl Freeze for Strictness
impl RefUnwindSafe for Strictness
impl Send for Strictness
impl Sync for Strictness
impl Unpin for Strictness
impl UnwindSafe for Strictness
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