Struct clarity_repl::clarity::contexts::OwnedEnvironment [−][src]
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]
mainnet: bool,
database: ClarityDatabase<'a>
) -> OwnedEnvironment<'a>
pub fn new_cost_limited(
mainnet: bool,
database: ClarityDatabase<'a>,
cost_tracker: LimitedCostTracker
) -> OwnedEnvironment<'a>
[src]
mainnet: bool,
database: ClarityDatabase<'a>,
cost_tracker: LimitedCostTracker
) -> OwnedEnvironment<'a>
pub fn get_exec_environment<'b>(
&'b mut self,
sender: Option<Value>
) -> Environment<'b, 'a>
[src]
&'b mut self,
sender: Option<Value>
) -> Environment<'b, 'a>
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]
&mut self,
sender: Value,
f: F
) -> Result<(A, AssetMap, Vec<StacksTransactionEvent>), E> where
E: From<Error>,
F: FnOnce(&mut Environment<'_, '_>) -> Result<A, E>,
pub fn initialize_contract(
&mut self,
contract_identifier: QualifiedContractIdentifier,
contract_content: &str
) -> Result<((), AssetMap, Vec<StacksTransactionEvent>)>
[src]
&mut self,
contract_identifier: QualifiedContractIdentifier,
contract_content: &str
) -> Result<((), AssetMap, Vec<StacksTransactionEvent>)>
pub fn initialize_contract_from_ast(
&mut self,
contract_identifier: QualifiedContractIdentifier,
contract_content: &ContractAST,
contract_string: &str
) -> Result<((), AssetMap, Vec<StacksTransactionEvent>)>
[src]
&mut self,
contract_identifier: QualifiedContractIdentifier,
contract_content: &ContractAST,
contract_string: &str
) -> Result<((), AssetMap, Vec<StacksTransactionEvent>)>
pub fn execute_transaction(
&mut self,
sender: Value,
contract_identifier: QualifiedContractIdentifier,
tx_name: &str,
args: &[SymbolicExpression]
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
[src]
&mut self,
sender: Value,
contract_identifier: QualifiedContractIdentifier,
tx_name: &str,
args: &[SymbolicExpression]
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
pub fn stx_transfer(
&mut self,
from: &PrincipalData,
to: &PrincipalData,
amount: u128
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
[src]
&mut self,
from: &PrincipalData,
to: &PrincipalData,
amount: u128
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
pub fn eval_read_only(
&mut self,
contract: &QualifiedContractIdentifier,
program: &str
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
[src]
&mut self,
contract: &QualifiedContractIdentifier,
program: &str
) -> Result<(Value, AssetMap, Vec<StacksTransactionEvent>)>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,