#[non_exhaustive]pub enum DuplicateKeys {
Error,
LastWins,
}Expand description
What to do with a duplicate mapping key.
Document and the serde deserializer read it alike.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Error
An error, as YAML 1.2 requires (the default).
LastWins
The last value wins, and a warning with a “first defined here” label
is always recorded. Part of Compat::serde_yaml().
Trait Implementations§
Source§impl Clone for DuplicateKeys
impl Clone for DuplicateKeys
impl Copy for DuplicateKeys
Source§impl Debug for DuplicateKeys
impl Debug for DuplicateKeys
Source§impl Default for DuplicateKeys
impl Default for DuplicateKeys
impl Eq for DuplicateKeys
Source§impl Hash for DuplicateKeys
impl Hash for DuplicateKeys
Source§impl PartialEq for DuplicateKeys
impl PartialEq for DuplicateKeys
impl StructuralPartialEq for DuplicateKeys
Auto Trait Implementations§
impl Freeze for DuplicateKeys
impl RefUnwindSafe for DuplicateKeys
impl Send for DuplicateKeys
impl Sync for DuplicateKeys
impl Unpin for DuplicateKeys
impl UnsafeUnpin for DuplicateKeys
impl UnwindSafe for DuplicateKeys
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