Struct clarity_repl::clarity::contexts::OwnedEnvironment[][src]

pub struct OwnedEnvironment<'a> { /* fields omitted */ }

Implementations

impl<'a> OwnedEnvironment<'a>[src]

pub fn new(database: ClarityDatabase<'a>) -> OwnedEnvironment<'a>[src]

pub fn new_free(
    mainnet: bool,
    database: ClarityDatabase<'a>
) -> OwnedEnvironment<'a>
[src]

pub fn new_cost_limited(
    mainnet: bool,
    database: ClarityDatabase<'a>,
    cost_tracker: LimitedCostTracker
) -> OwnedEnvironment<'a>
[src]

pub fn get_exec_environment<'b>(
    &'b mut self,
    sender: Option<Value>
) -> Environment<'b, 'a>
[src]

pub fn execute_in_env<F, A, E>(
    &mut self,
    sender: Value,
    f: F
) -> Result<(A, AssetMap, Vec<StacksTransactionEvent>), E> where
    E: From<Error>,
    F: FnOnce(&mut Environment<'_, '_>) -> Result<A, E>, 
[src]

pub fn initialize_contract(
    &mut self,
    contract_identifier: QualifiedContractIdentifier,
    contract_content: &str
) -> Result<((), AssetMap, Vec<StacksTransactionEvent>)>
[src]

pub fn initialize_contract_from_ast(
    &mut self,
    contract_identifier: QualifiedContractIdentifier,
    contract_content: &ContractAST,
    contract_string: &str
) -> Result<((), AssetMap, Vec<StacksTransactionEvent>)>
[src]

pub fn execute_transaction(
    &mut self,
    sender: Value,
    contract_identifier: QualifiedContractIdentifier,
    tx_name: &str,
    args: &[SymbolicExpression]
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
[src]

pub fn stx_transfer(
    &mut self,
    from: &PrincipalData,
    to: &PrincipalData,
    amount: u128
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
[src]

pub fn eval_read_only(
    &mut self,
    contract: &QualifiedContractIdentifier,
    program: &str
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
[src]

pub fn begin(&mut self)[src]

pub fn commit(&mut self) -> Result<(AssetMap, EventBatch)>[src]

pub fn destruct(self) -> Option<(ClarityDatabase<'a>, LimitedCostTracker)>[src]

Destroys this environment, returning ownership of its database reference. If the context wasn’t top-level (i.e., it had uncommitted data), return None, because the database is not guaranteed to be in a sane state.

Auto Trait Implementations

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

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

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

impl<'a> Unpin for OwnedEnvironment<'a>

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

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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,