pub struct Alternative<T, Z: ?Sized>(pub T, pub PhantomData<Z>);Expand description
Tuple Fields§
§0: T§1: PhantomData<Z>Implementations§
Trait Implementations§
Source§impl<T: Clone, Z: Clone + ?Sized> Clone for Alternative<T, Z>
impl<T: Clone, Z: Clone + ?Sized> Clone for Alternative<T, Z>
Source§fn clone(&self) -> Alternative<T, Z>
fn clone(&self) -> Alternative<T, Z>
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<T: Default, Z: Default + ?Sized> Default for Alternative<T, Z>
impl<T: Default, Z: Default + ?Sized> Default for Alternative<T, Z>
Source§fn default() -> Alternative<T, Z>
fn default() -> Alternative<T, Z>
Returns the “default value” for a type. Read more
Source§impl<T, Z: ?Sized> Deref for Alternative<T, Z>
impl<T, Z: ?Sized> Deref for Alternative<T, Z>
Source§impl<T, Z: ?Sized> DerefMut for Alternative<T, Z>
impl<T, Z: ?Sized> DerefMut for Alternative<T, Z>
Source§impl<'de, T: Deserialize<'de>, Z: ?Sized> Deserialize<'de> for Alternative<T, Z>
impl<'de, T: Deserialize<'de>, Z: ?Sized> Deserialize<'de> for Alternative<T, Z>
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, Z> From<T> for Alternative<T, Z>
impl<T, Z> From<T> for Alternative<T, Z>
Source§impl<T: Ord, Z: Ord + ?Sized> Ord for Alternative<T, Z>
impl<T: Ord, Z: Ord + ?Sized> Ord for Alternative<T, Z>
Source§fn cmp(&self, other: &Alternative<T, Z>) -> Ordering
fn cmp(&self, other: &Alternative<T, Z>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd, Z: PartialOrd + ?Sized> PartialOrd for Alternative<T, Z>
impl<T: PartialOrd, Z: PartialOrd + ?Sized> PartialOrd for Alternative<T, Z>
impl<T: Copy, Z: Copy + ?Sized> Copy for Alternative<T, Z>
impl<T: Eq, Z: Eq + ?Sized> Eq for Alternative<T, Z>
impl<T, Z: ?Sized> StructuralPartialEq for Alternative<T, Z>
Auto Trait Implementations§
impl<T, Z> Freeze for Alternative<T, Z>
impl<T, Z> RefUnwindSafe for Alternative<T, Z>
impl<T, Z> Send for Alternative<T, Z>
impl<T, Z> Sync for Alternative<T, Z>
impl<T, Z> Unpin for Alternative<T, Z>
impl<T, Z> UnwindSafe for Alternative<T, Z>
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