pub struct Alt<T>(pub T);Expand description
Wrapper to activate the Alternative serialization of any inner type.
Tuple Fields§
§0: TImplementations§
Trait Implementations§
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for Alt<T>
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Alt<T>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Ord> Ord for Alt<T>
impl<T: Ord> Ord for Alt<T>
Source§impl<T: PartialOrd> PartialOrd for Alt<T>
impl<T: PartialOrd> PartialOrd for Alt<T>
impl<T: Copy> Copy for Alt<T>
impl<T: Eq> Eq for Alt<T>
impl<T> StructuralPartialEq for Alt<T>
Auto Trait Implementations§
impl<T> Freeze for Alt<T>where
T: Freeze,
impl<T> RefUnwindSafe for Alt<T>where
T: RefUnwindSafe,
impl<T> Send for Alt<T>where
T: Send,
impl<T> Sync for Alt<T>where
T: Sync,
impl<T> Unpin for Alt<T>where
T: Unpin,
impl<T> UnwindSafe for Alt<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