pub struct CaseId(pub u32);Expand description
Names one case of an enum layout: its position in
crate::layout::Shape::Enum::cases.
It is the number an enum’s discriminant word holds, and it is a type
of its own for the reason crate::Repr::Tag is: the word is an
integer and the value is not one. Where the number is written into a
slot — crate::Inst::Tag — the id says which case it names, and the
verifier bounds it against the layout rather than against nothing.
Tuple Fields§
§0: u32Implementations§
Trait Implementations§
impl Copy for CaseId
impl Eq for CaseId
Source§impl Ord for CaseId
impl Ord for CaseId
1.21.0 (const: unstable) · 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 PartialOrd for CaseId
impl PartialOrd for CaseId
impl StructuralPartialEq for CaseId
Auto Trait Implementations§
impl Freeze for CaseId
impl RefUnwindSafe for CaseId
impl Send for CaseId
impl Sync for CaseId
impl Unpin for CaseId
impl UnsafeUnpin for CaseId
impl UnwindSafe for CaseId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.