[−][src]Struct cranelift_codegen::ir::entities::Constant
An opaque reference to a constant.
You can store ConstantData in a
ConstantPool for efficient storage and retrieval.
See ConstantPool::insert.
Methods
impl Constant
pub fn from_u32(x: u32) -> Self
Return the underlying index value as a u32.
pub fn as_u32(self) -> u32
Return the underlying index value as a u32.
impl Constant[src]
pub fn with_number(n: u32) -> Option<Self>[src]
Create a const reference from its number.
This method is for use by the parser.
Trait Implementations
impl Display for Constant
impl Debug for Constant
impl PartialEq<Constant> for Constant[src]
impl Eq for Constant[src]
impl Ord for Constant[src]
fn cmp(&self, other: &Constant) -> Ordering[src]
fn max(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> Self1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self[src]
impl PartialOrd<Constant> for Constant[src]
fn partial_cmp(&self, other: &Constant) -> Option<Ordering>[src]
fn lt(&self, other: &Constant) -> bool[src]
fn le(&self, other: &Constant) -> bool[src]
fn gt(&self, other: &Constant) -> bool[src]
fn ge(&self, other: &Constant) -> bool[src]
impl Hash for Constant[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl Copy for Constant[src]
impl StructuralPartialEq for Constant[src]
impl StructuralEq for Constant[src]
impl Clone for Constant[src]
impl EntityRef for Constant
impl ReservedValue for Constant
fn reserved_value() -> Constant
Auto Trait Implementations
impl Unpin for Constant
impl Send for Constant
impl Sync for Constant
impl UnwindSafe for Constant
impl RefUnwindSafe for Constant
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
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, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T> SparseMapValue<T> for T where
T: EntityRef, [src]
T: EntityRef,