pub enum TryConstructKind {
Discard,
UseDefault,
Trim,
}Expand description
Try-Construct-Strategie (Spec §7.5.2 + §7.6.4).
The apply semantics (what happens on a decoder failure) is implemented in C4.7 — here only the enum + member field.
Variants§
Discard
Discard the sample.
UseDefault
Set to the default value.
Trim
Truncate to the bound (strings/sequences).
Trait Implementations§
Source§impl Clone for TryConstructKind
impl Clone for TryConstructKind
Source§fn clone(&self) -> TryConstructKind
fn clone(&self) -> TryConstructKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TryConstructKind
Source§impl Debug for TryConstructKind
impl Debug for TryConstructKind
Source§impl Default for TryConstructKind
impl Default for TryConstructKind
impl Eq for TryConstructKind
Source§impl PartialEq for TryConstructKind
impl PartialEq for TryConstructKind
Source§fn eq(&self, other: &TryConstructKind) -> bool
fn eq(&self, other: &TryConstructKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TryConstructKind
Auto Trait Implementations§
impl Freeze for TryConstructKind
impl RefUnwindSafe for TryConstructKind
impl Send for TryConstructKind
impl Sync for TryConstructKind
impl Unpin for TryConstructKind
impl UnsafeUnpin for TryConstructKind
impl UnwindSafe for TryConstructKind
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