Enum rustc_transmute::Answer
source · pub enum Answer<R>where
R: Ref,{
Yes,
No(Reason),
IfTransmutable {
src: R,
dst: R,
},
IfAll(Vec<Answer<R>>),
IfAny(Vec<Answer<R>>),
}Expand description
The type encodes answers to the question: “Are these types transmutable?”
Variants
Yes
Src is transmutable into Dst.
No(Reason)
Src is NOT transmutable into Dst.
IfTransmutable
Src is transmutable into Dst, if src is transmutable into dst.
IfAll(Vec<Answer<R>>)
Src is transmutable into Dst, if all of the enclosed requirements are met.
IfAny(Vec<Answer<R>>)
Src is transmutable into Dst if any of the enclosed requirements are met.
Implementations
Trait Implementations
sourceimpl<R: Ord> Ord for Answer<R>where
R: Ref,
impl<R: Ord> Ord for Answer<R>where
R: Ref,
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<R: PartialEq> PartialEq<Answer<R>> for Answer<R>where
R: Ref,
impl<R: PartialEq> PartialEq<Answer<R>> for Answer<R>where
R: Ref,
sourceimpl<R: PartialOrd> PartialOrd<Answer<R>> for Answer<R>where
R: Ref,
impl<R: PartialOrd> PartialOrd<Answer<R>> for Answer<R>where
R: Ref,
sourcefn partial_cmp(&self, other: &Answer<R>) -> Option<Ordering>
fn partial_cmp(&self, other: &Answer<R>) -> Option<Ordering>
1.0.0 · sourcefn 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 moreimpl<R: Eq> Eq for Answer<R>where
R: Ref,
impl<R> StructuralEq for Answer<R>where
R: Ref,
impl<R> StructuralPartialEq for Answer<R>where
R: Ref,
Auto Trait Implementations
impl<R> RefUnwindSafe for Answer<R>where
R: RefUnwindSafe,
impl<R> Send for Answer<R>where
R: Send,
impl<R> Sync for Answer<R>where
R: Sync,
impl<R> Unpin for Answer<R>where
R: Unpin,
impl<R> UnwindSafe for Answer<R>where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.