Struct serde_single_or_vec2::PreferSingle
source · [−]pub struct PreferSingle {}
Expand description
Returns a single value on serialisation if there is only one in the vector
Trait Implementations
sourceimpl Clone for PreferSingle
impl Clone for PreferSingle
sourcefn clone(&self) -> PreferSingle
fn clone(&self) -> PreferSingle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PreferSingle
impl Debug for PreferSingle
sourceimpl Format for PreferSingle
impl Format for PreferSingle
sourcefn use_single() -> bool
fn use_single() -> bool
If this returns true, the serializer will returns a single value if there is only one in the vector. Otherwise it will always returns a vector Read more
impl Copy for PreferSingle
Auto Trait Implementations
impl RefUnwindSafe for PreferSingle
impl Send for PreferSingle
impl Sync for PreferSingle
impl Unpin for PreferSingle
impl UnwindSafe for PreferSingle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more