[−]Struct rustc_target::abi::VariantIdx
Methods
impl VariantIdx
pub const MAX_AS_U32: u32
pub const MAX: VariantIdx
pub fn from_usize(value: usize) -> Self
pub fn from_u32(value: u32) -> Self
pub const fn from_u32_const(value: u32) -> Self
Hacky variant of from_u32
for use in constants.
This version checks the "max" constraint by using an
invalid array dereference.
pub const unsafe fn from_u32_unchecked(value: u32) -> Self
pub fn index(self) -> usize
Extracts the value of this index as an integer.
pub fn as_u32(self) -> u32
Extracts the value of this index as a u32
.
pub fn as_usize(self) -> usize
Extracts the value of this index as a usize
.
Trait Implementations
impl Clone for VariantIdx
fn clone(&self) -> Self
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for VariantIdx
fn cmp(&self, other: &VariantIdx) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl From<VariantIdx> for u32
fn from(v: VariantIdx) -> u32
impl From<VariantIdx> for usize
fn from(v: VariantIdx) -> usize
impl From<usize> for VariantIdx
impl From<u32> for VariantIdx
impl Eq for VariantIdx
impl Copy for VariantIdx
impl PartialOrd<VariantIdx> for VariantIdx
fn partial_cmp(&self, other: &VariantIdx) -> Option<Ordering>
fn lt(&self, other: &VariantIdx) -> bool
fn le(&self, other: &VariantIdx) -> bool
fn gt(&self, other: &VariantIdx) -> bool
fn ge(&self, other: &VariantIdx) -> bool
impl PartialEq<VariantIdx> for VariantIdx
fn eq(&self, other: &VariantIdx) -> bool
fn ne(&self, other: &VariantIdx) -> bool
impl Debug for VariantIdx
impl Hash for VariantIdx
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Step for VariantIdx
fn steps_between(start: &Self, end: &Self) -> Option<usize>
fn replace_one(&mut self) -> Self
fn replace_zero(&mut self) -> Self
fn add_one(&self) -> Self
fn sub_one(&self) -> Self
fn add_usize(&self, u: usize) -> Option<Self>
impl Encodable for VariantIdx
impl Decodable for VariantIdx
impl Idx for VariantIdx
Auto Trait Implementations
impl Send for VariantIdx
impl Sync for VariantIdx
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Encodable for T where
T: UseSpecializedEncodable + ?Sized,
[src]
T: UseSpecializedEncodable + ?Sized,
impl<T> Decodable for T where
T: UseSpecializedDecodable,
[src]
T: UseSpecializedDecodable,
impl<E> SpecializationError for E
[src]
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,