pub enum DuplicateKeyPolicy {
Error,
FirstWins,
LastWins,
}
Expand description
Duplicate key handling policy for mappings.
Variants§
Error
Error out on encountering a duplicate key.
FirstWins
First key wins: later duplicate pairs are skipped (key+value are consumed and ignored).
LastWins
Last key wins: later duplicate pairs are passed through (default Serde targets typically overwrite).
Trait Implementations§
Source§impl Clone for DuplicateKeyPolicy
impl Clone for DuplicateKeyPolicy
Source§fn clone(&self) -> DuplicateKeyPolicy
fn clone(&self) -> DuplicateKeyPolicy
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 DuplicateKeyPolicy
impl Debug for DuplicateKeyPolicy
impl Copy for DuplicateKeyPolicy
Auto Trait Implementations§
impl Freeze for DuplicateKeyPolicy
impl RefUnwindSafe for DuplicateKeyPolicy
impl Send for DuplicateKeyPolicy
impl Sync for DuplicateKeyPolicy
impl Unpin for DuplicateKeyPolicy
impl UnwindSafe for DuplicateKeyPolicy
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