Enum cranelift_codegen::machinst::vcode::VCodeConstantData[][src]

pub enum VCodeConstantData {
    Pool(ConstantConstantData),
    WellKnown(&'static [u8]),
    Generated(ConstantData),
}

Identify the different types of constant that can be inserted into VCodeConstants. Tracking these separately instead of as raw byte buffers allows us to avoid some duplication.

Variants

Pool(ConstantConstantData)

A constant already present in the Cranelift IR ConstantPool.

WellKnown(&'static [u8])

A reference to a well-known constant value that is statically encoded within the compiler.

Generated(ConstantData)

A constant value generated during lowering; the value may depend on the instruction context which makes it difficult to de-duplicate–if possible, use other variants.

Implementations

impl VCodeConstantData[src]

pub fn as_slice(&self) -> &[u8][src]

Retrieve the constant data as a byte slice.

pub fn alignment(&self) -> u32[src]

Calculate the alignment of the constant data.

Auto Trait Implementations

impl RefUnwindSafe for VCodeConstantData

impl Send for VCodeConstantData

impl Sync for VCodeConstantData

impl Unpin for VCodeConstantData

impl UnwindSafe for VCodeConstantData

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.