Struct compatible_with::Compatible
source · pub struct Compatible<Old, Current>(_);Implementations§
source§impl<Old, Current> Compatible<Old, Current>where
Current: CompatibleWith<Old>,
impl<Old, Current> Compatible<Old, Current>where Current: CompatibleWith<Old>,
pub fn into_current(self) -> Current
pub fn make_current(self) -> Self
Trait Implementations§
source§impl<Old: Clone, Current: Clone> Clone for Compatible<Old, Current>
impl<Old: Clone, Current: Clone> Clone for Compatible<Old, Current>
source§fn clone(&self) -> Compatible<Old, Current>
fn clone(&self) -> Compatible<Old, Current>
Returns a copy 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<'de, Old, Current> Deserialize<'de> for Compatible<Old, Current>where
Current: CompatibleWith<Old>,
Alt<Old, Current>: Deserialize<'de>,
impl<'de, Old, Current> Deserialize<'de> for Compatible<Old, Current>where Current: CompatibleWith<Old>, Alt<Old, Current>: 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<Old: Ord, Current: Ord> Ord for Compatible<Old, Current>
impl<Old: Ord, Current: Ord> Ord for Compatible<Old, Current>
source§fn cmp(&self, other: &Compatible<Old, Current>) -> Ordering
fn cmp(&self, other: &Compatible<Old, Current>) -> 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<Old: PartialEq, Current: PartialEq> PartialEq<Compatible<Old, Current>> for Compatible<Old, Current>
impl<Old: PartialEq, Current: PartialEq> PartialEq<Compatible<Old, Current>> for Compatible<Old, Current>
source§fn eq(&self, other: &Compatible<Old, Current>) -> bool
fn eq(&self, other: &Compatible<Old, Current>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<Old: PartialOrd, Current: PartialOrd> PartialOrd<Compatible<Old, Current>> for Compatible<Old, Current>
impl<Old: PartialOrd, Current: PartialOrd> PartialOrd<Compatible<Old, Current>> for Compatible<Old, Current>
source§fn partial_cmp(&self, other: &Compatible<Old, Current>) -> Option<Ordering>
fn partial_cmp(&self, other: &Compatible<Old, Current>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<Old, Current> Serialize for Compatible<Old, Current>where
Old: Serialize,
Current: Serialize,
impl<Old, Current> Serialize for Compatible<Old, Current>where Old: Serialize, Current: Serialize,
impl<Old: Copy, Current: Copy> Copy for Compatible<Old, Current>
impl<Old: Eq, Current: Eq> Eq for Compatible<Old, Current>
impl<Old, Current> StructuralEq for Compatible<Old, Current>
impl<Old, Current> StructuralPartialEq for Compatible<Old, Current>
Auto Trait Implementations§
impl<Old, Current> RefUnwindSafe for Compatible<Old, Current>where Current: RefUnwindSafe, Old: RefUnwindSafe,
impl<Old, Current> Send for Compatible<Old, Current>where Current: Send, Old: Send,
impl<Old, Current> Sync for Compatible<Old, Current>where Current: Sync, Old: Sync,
impl<Old, Current> Unpin for Compatible<Old, Current>where Current: Unpin, Old: Unpin,
impl<Old, Current> UnwindSafe for Compatible<Old, Current>where Current: UnwindSafe, Old: 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