Skip to main content

VmStateBuilder

Struct VmStateBuilder 

Source
pub struct VmStateBuilder<'a> {
    pub code: Option<OwnedCellSlice>,
    pub data: Option<Cell>,
    pub stack: SafeRc<Stack>,
    pub libraries: Option<&'a dyn LibraryProvider>,
    pub c7: Option<SafeRc<Vec<RcStackValue>>>,
    pub gas: GasParams,
    pub init_selector: InitSelectorParams,
    pub version: Option<VmVersion>,
    pub modifiers: BehaviourModifiers,
    pub debug: Option<&'a mut dyn Write>,
}
Expand description

Execution state builder.

Fields§

§code: Option<OwnedCellSlice>§data: Option<Cell>§stack: SafeRc<Stack>§libraries: Option<&'a dyn LibraryProvider>§c7: Option<SafeRc<Vec<RcStackValue>>>§gas: GasParams§init_selector: InitSelectorParams§version: Option<VmVersion>§modifiers: BehaviourModifiers§debug: Option<&'a mut dyn Write>

Implementations§

Source§

impl<'a> VmStateBuilder<'a>

Source

pub fn new() -> Self

Source

pub fn build(self) -> VmState<'a>

Source

pub fn with_libraries<T: LibraryProvider>(self, libraries: &'a T) -> Self

Source

pub fn with_gas(self, gas: GasParams) -> Self

Source

pub fn with_debug<T: Write>(self, stderr: &'a mut T) -> Self

Source

pub fn with_code<T: IntoCode>(self, code: T) -> Self

Source

pub fn with_data(self, data: Cell) -> Self

Source

pub fn with_init_selector(self, push0: bool) -> Self

Source

pub fn with_stack<I: IntoIterator<Item = RcStackValue>>(self, values: I) -> Self

Source

pub fn with_raw_stack(self, stack: SafeRc<Stack>) -> Self

Source

pub fn with_smc_info<T: SmcInfo>(self, info: T) -> Self

Source

pub fn with_modifiers(self, modifiers: BehaviourModifiers) -> Self

Source

pub fn with_version(self, version: VmVersion) -> Self

Trait Implementations§

Source§

impl<'a> Default for VmStateBuilder<'a>

Source§

fn default() -> VmStateBuilder<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for VmStateBuilder<'a>

§

impl<'a> !RefUnwindSafe for VmStateBuilder<'a>

§

impl<'a> !Send for VmStateBuilder<'a>

§

impl<'a> !Sync for VmStateBuilder<'a>

§

impl<'a> Unpin for VmStateBuilder<'a>

§

impl<'a> !UnwindSafe for VmStateBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> SafeDelete for T
where T: 'static,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> EquivalentRepr<T> for T