pub enum EmptyObject<T> {
Some(T),
None {},
}
Expand description
Enum to parse empty JSON objects as Option::None.
Variants§
Implementations§
source§impl<T> EmptyObject<T>
impl<T> EmptyObject<T>
Trait Implementations§
source§impl<T: Debug> Debug for EmptyObject<T>
impl<T: Debug> Debug for EmptyObject<T>
source§impl<'de, T> Deserialize<'de> for EmptyObject<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for EmptyObject<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> From<EmptyObject<T>> for Option<T>
impl<T> From<EmptyObject<T>> for Option<T>
source§fn from(empty_object: EmptyObject<T>) -> Option<T>
fn from(empty_object: EmptyObject<T>) -> Option<T>
Converts to this type from the input type.
source§impl<T> From<Option<T>> for EmptyObject<T>
impl<T> From<Option<T>> for EmptyObject<T>
source§fn from(option: Option<T>) -> EmptyObject<T>
fn from(option: Option<T>) -> EmptyObject<T>
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for EmptyObject<T>where
T: Freeze,
impl<T> RefUnwindSafe for EmptyObject<T>where
T: RefUnwindSafe,
impl<T> Send for EmptyObject<T>where
T: Send,
impl<T> Sync for EmptyObject<T>where
T: Sync,
impl<T> Unpin for EmptyObject<T>where
T: Unpin,
impl<T> UnwindSafe for EmptyObject<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