Struct DefaultRuntimeProvider

Source
pub struct DefaultRuntimeProvider { /* private fields */ }

Trait Implementations§

Source§

impl Debug for DefaultRuntimeProvider

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DefaultRuntimeProvider

Source§

fn default() -> DefaultRuntimeProvider

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

impl RuntimeProvider for DefaultRuntimeProvider

Source§

fn collect_definitions(&self) -> Vec<FunctionDefinition>

Source§

fn alloc(&mut self, _db: &dyn CodegenDb, bytes: Expression) -> Expression

Source§

fn avail(&mut self, _db: &dyn CodegenDb) -> Expression

Source§

fn create( &mut self, db: &dyn CodegenDb, contract: ContractId, value: Expression, ) -> Expression

Source§

fn create2( &mut self, db: &dyn CodegenDb, contract: ContractId, value: Expression, salt: Expression, ) -> Expression

Source§

fn emit( &mut self, db: &dyn CodegenDb, event: Expression, event_ty: TypeId, ) -> Expression

Source§

fn revert( &mut self, db: &dyn CodegenDb, arg: Option<Expression>, arg_name: &str, arg_ty: TypeId, ) -> Expression

Source§

fn external_call( &mut self, db: &dyn CodegenDb, function: FunctionId, args: Vec<Expression>, ) -> Expression

Source§

fn map_value_ptr( &mut self, db: &dyn CodegenDb, map_ptr: Expression, key: Expression, key_ty: TypeId, ) -> Expression

Source§

fn aggregate_init( &mut self, db: &dyn CodegenDb, ptr: Expression, args: Vec<Expression>, ptr_ty: TypeId, arg_tys: Vec<TypeId>, ) -> Expression

Source§

fn string_copy( &mut self, db: &dyn CodegenDb, dst: Expression, data: &str, is_dst_storage: bool, ) -> Expression

Source§

fn string_construct( &mut self, db: &dyn CodegenDb, data: &str, string_len: usize, ) -> Expression

Source§

fn ptr_copy( &mut self, _db: &dyn CodegenDb, src: Expression, dst: Expression, size: Expression, is_src_storage: bool, is_dst_storage: bool, ) -> Expression

Copy data from src to dst. NOTE: src and dst must be aligned by 32 when a ptr is storage ptr.
Source§

fn ptr_store( &mut self, db: &dyn CodegenDb, ptr: Expression, imm: Expression, ptr_ty: TypeId, ) -> Expression

Source§

fn ptr_load( &mut self, db: &dyn CodegenDb, ptr: Expression, ptr_ty: TypeId, ) -> Expression

Source§

fn abi_encode( &mut self, db: &dyn CodegenDb, src: Expression, dst: Expression, src_ty: TypeId, is_dst_storage: bool, ) -> Expression

Source§

fn abi_encode_seq( &mut self, db: &dyn CodegenDb, src: &[Expression], dst: Expression, src_tys: &[TypeId], is_dst_storage: bool, ) -> Expression

Source§

fn abi_decode( &mut self, db: &dyn CodegenDb, src: Expression, size: Expression, types: &[TypeId], abi_loc: AbiSrcLocation, ) -> Expression

Source§

fn safe_add( &mut self, db: &dyn CodegenDb, lhs: Expression, rhs: Expression, ty: TypeId, ) -> Expression

Source§

fn safe_sub( &mut self, db: &dyn CodegenDb, lhs: Expression, rhs: Expression, ty: TypeId, ) -> Expression

Source§

fn safe_mul( &mut self, db: &dyn CodegenDb, lhs: Expression, rhs: Expression, ty: TypeId, ) -> Expression

Source§

fn safe_div( &mut self, db: &dyn CodegenDb, lhs: Expression, rhs: Expression, ty: TypeId, ) -> Expression

Source§

fn safe_mod( &mut self, db: &dyn CodegenDb, lhs: Expression, rhs: Expression, ty: TypeId, ) -> Expression

Source§

fn safe_pow( &mut self, db: &dyn CodegenDb, lhs: Expression, rhs: Expression, ty: TypeId, ) -> Expression

Source§

fn primitive_cast( &mut self, db: &dyn CodegenDb, value: Expression, from_ty: TypeId, ) -> Expression

Auto Trait Implementations§

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, 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.