Struct cranelift_codegen::ir::constant::ConstantPoolEntry
source · [−]pub struct ConstantPoolEntry { /* private fields */ }
Expand description
Inner type for storing data and offset together in the constant pool. The offset is optional
because it must be set relative to the function code size (i.e. constants are emitted after the
function body); because the function is not yet compiled when constants are inserted,
set_offset
must be called once a constant’s offset
from the beginning of the function is known (see
relaxation
in relaxation.rs
).
Implementations
sourceimpl ConstantPoolEntry
impl ConstantPoolEntry
sourcepub fn set_offset(&mut self, offset: ConstantOffset)
pub fn set_offset(&mut self, offset: ConstantOffset)
Assign a new offset to the constant at this entry.
Trait Implementations
sourceimpl Clone for ConstantPoolEntry
impl Clone for ConstantPoolEntry
sourcefn clone(&self) -> ConstantPoolEntry
fn clone(&self) -> ConstantPoolEntry
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ConstantPoolEntry
impl Send for ConstantPoolEntry
impl Sync for ConstantPoolEntry
impl Unpin for ConstantPoolEntry
impl UnwindSafe for ConstantPoolEntry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more