pub enum AllowEmpty<T> {
None,
Some(T),
}Expand description
Work same way as Option<T> except for TokenDeserialize trait
Variants§
Implementations§
Source§impl<T> AllowEmpty<T>
Work same way as Option<T>
impl<T> AllowEmpty<T>
Work same way as Option<T>
Source§impl<T: Copy> AllowEmpty<&T>
impl<T: Copy> AllowEmpty<&T>
pub fn copied(self) -> AllowEmpty<T>
Source§impl<T: Clone> AllowEmpty<&T>
impl<T: Clone> AllowEmpty<&T>
pub fn cloned(self) -> AllowEmpty<T>
Trait Implementations§
Source§impl<T: Clone> Clone for AllowEmpty<T>
impl<T: Clone> Clone for AllowEmpty<T>
Source§fn clone(&self) -> AllowEmpty<T>
fn clone(&self) -> AllowEmpty<T>
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 moreSource§impl<T: Debug> Debug for AllowEmpty<T>
impl<T: Debug> Debug for AllowEmpty<T>
Source§impl<T> Default for AllowEmpty<T>
impl<T> Default for AllowEmpty<T>
Source§impl<'de, T> Deserialize<'de> for AllowEmpty<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for AllowEmpty<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Hash> Hash for AllowEmpty<T>
impl<T: Hash> Hash for AllowEmpty<T>
Source§impl<T: PartialEq> PartialEq for AllowEmpty<T>
impl<T: PartialEq> PartialEq for AllowEmpty<T>
Source§fn eq(&self, other: &AllowEmpty<T>) -> bool
fn eq(&self, other: &AllowEmpty<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<T> Serialize for AllowEmpty<T>where
T: Serialize,
impl<T> Serialize for AllowEmpty<T>where
T: Serialize,
impl<T: Eq> Eq for AllowEmpty<T>
impl<T> StructuralPartialEq for AllowEmpty<T>
Auto Trait Implementations§
impl<T> Freeze for AllowEmpty<T>where
T: Freeze,
impl<T> RefUnwindSafe for AllowEmpty<T>where
T: RefUnwindSafe,
impl<T> Send for AllowEmpty<T>where
T: Send,
impl<T> Sync for AllowEmpty<T>where
T: Sync,
impl<T> Unpin for AllowEmpty<T>where
T: Unpin,
impl<T> UnsafeUnpin for AllowEmpty<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AllowEmpty<T>where
T: UnwindSafe,
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