Struct clarity_repl::repl::interpreter::ClarityInterpreter
source · [−]pub struct ClarityInterpreter {
pub datastore: Datastore,
/* private fields */
}
Fields
datastore: Datastore
Implementations
sourceimpl ClarityInterpreter
impl ClarityInterpreter
pub fn new(
tx_sender: StandardPrincipalData,
repl_settings: Settings
) -> ClarityInterpreter
pub fn run(
&mut self,
snippet: String,
contract_identifier: QualifiedContractIdentifier,
cost_track: bool,
eval_hooks: Option<Vec<Box<dyn EvalHook>>>
) -> Result<ExecutionResult, Vec<Diagnostic>>
pub fn run_ast(
&mut self,
ast: ContractAST,
snippet: String,
contract_identifier: QualifiedContractIdentifier,
cost_track: bool,
eval_hooks: Option<Vec<Box<dyn EvalHook>>>
) -> Result<ExecutionResult, Vec<Diagnostic>>
pub fn detect_dependencies(
&mut self,
contract_id: String,
snippet: String,
parser_version: u32
) -> Result<Vec<Dependency>, String>
pub fn build_ast(
&self,
contract_identifier: QualifiedContractIdentifier,
snippet: String,
parser_version: u32
) -> (ContractAST, Vec<Diagnostic>, bool)
pub fn collect_annotations(
&self,
ast: &ContractAST,
snippet: &String
) -> (Vec<Annotation>, Vec<Diagnostic>)
pub fn run_analysis(
&mut self,
contract_identifier: QualifiedContractIdentifier,
contract_ast: &mut ContractAST,
annotations: &Vec<Annotation>
) -> Result<(ContractAnalysis, Vec<Diagnostic>), (String, Option<Diagnostic>, Option<Error>)>
pub fn save_contract(
&mut self,
contract_identifier: QualifiedContractIdentifier,
contract_ast: &mut ContractAST,
snippet: String,
contract_analysis: ContractAnalysis,
mainnet: bool
)
pub fn execute(
&mut self,
contract_identifier: QualifiedContractIdentifier,
contract_ast: &mut ContractAST,
snippet: String,
contract_analysis: ContractAnalysis,
cost_track: bool,
eval_hooks: Option<Vec<Box<dyn EvalHook>>>
) -> Result<ExecutionResult, (String, Option<Diagnostic>, Option<Error>)>
pub fn mint_stx_balance(
&mut self,
recipient: PrincipalData,
amount: u64
) -> Result<String, String>
pub fn set_tx_sender(&mut self, tx_sender: StandardPrincipalData)
pub fn get_tx_sender(&self) -> StandardPrincipalData
pub fn advance_chain_tip(&mut self, count: u32) -> u32
pub fn get_block_height(&mut self) -> u32
pub fn get_assets_maps(&self) -> BTreeMap<String, BTreeMap<String, u128>>
pub fn get_tokens(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
pub fn get_accounts(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
pub fn get_balance_for_account(&self, account: &str, token: &str) -> u128
Trait Implementations
sourceimpl Clone for ClarityInterpreter
impl Clone for ClarityInterpreter
sourcefn clone(&self) -> ClarityInterpreter
fn clone(&self) -> ClarityInterpreter
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for ClarityInterpreter
impl Send for ClarityInterpreter
impl Sync for ClarityInterpreter
impl Unpin for ClarityInterpreter
impl UnwindSafe for ClarityInterpreter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more