Skip to main content

StoreConst

Trait StoreConst 

Source
pub trait StoreConst<T> {
    // Required methods
    fn store_const(&self, value: T) -> StackAddress;
    fn update_const(&self, position: StackAddress, value: T);
}
Expand description

Trait for writing typed data to a program const pool.

Required Methods§

Source

fn store_const(&self, value: T) -> StackAddress

Write a constant to the constant pool

Source

fn update_const(&self, position: StackAddress, value: T)

Update a previously written (placeholder) constant.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<P> StoreConst<&str> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<f32> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<f64> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<i8> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<i16> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<i32> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<i64> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<isize> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<u8> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<u16> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<u32> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<u64> for Writer<P>
where P: VMFunc<P>,

Source§

impl<P> StoreConst<usize> for Writer<P>
where P: VMFunc<P>,