pub struct Session {
pub is_interactive: bool,
pub settings: SessionSettings,
pub contracts: BTreeMap<String, BTreeMap<String, Vec<String>>>,
pub asts: BTreeMap<QualifiedContractIdentifier, ContractAST>,
pub interpreter: ClarityInterpreter,
pub coverage_reports: Vec<TestCoverageReport>,
pub costs_reports: Vec<CostsReport>,
pub initial_contracts_analysis: Vec<(ContractAnalysis, String, String)>,
pub show_costs: bool,
pub executed: Vec<String>,
/* private fields */
}
Fields
is_interactive: bool
settings: SessionSettings
contracts: BTreeMap<String, BTreeMap<String, Vec<String>>>
asts: BTreeMap<QualifiedContractIdentifier, ContractAST>
interpreter: ClarityInterpreter
coverage_reports: Vec<TestCoverageReport>
costs_reports: Vec<CostsReport>
initial_contracts_analysis: Vec<(ContractAnalysis, String, String)>
show_costs: bool
executed: Vec<String>
Implementations
sourceimpl Session
impl Session
pub fn new(settings: SessionSettings) -> Session
pub fn load_boot_contracts(&mut self)
pub fn start(
&mut self
) -> Result<(String, Vec<(ContractAnalysis, String, String)>), String>
pub fn interpret_initial_contracts(
&mut self
) -> Result<(Vec<String>, Vec<(ContractAnalysis, String, String)>), Vec<String>>
pub fn include_boot_contracts(&mut self)
pub fn get_boot_contracts_asts(
&self
) -> BTreeMap<QualifiedContractIdentifier, ContractAST>
pub fn handle_command(&mut self, command: &str) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
pub fn formatted_interpretation(
&mut self,
snippet: String,
name: Option<String>,
cost_track: bool,
eval_hooks: Option<Vec<Box<dyn EvalHook>>>,
test_name: Option<String>
) -> Result<(Vec<String>, ExecutionResult), Vec<String>>
pub fn debug(&mut self, output: &mut Vec<String>, cmd: &str)
pub fn trace(&mut self, output: &mut Vec<String>, cmd: &str)
pub fn read(&mut self, output: &mut Vec<String>, cmd: &str)
pub fn formatted_interpretation_ast(
&mut self,
snippet: String,
ast: ContractAST,
contract_identifier: QualifiedContractIdentifier,
cost_track: bool,
eval_hooks: Option<Vec<Box<dyn EvalHook>>>,
test_name: Option<String>
) -> Result<(Vec<String>, ExecutionResult), Vec<String>>
pub fn invoke_contract_call(
&mut self,
contract: &str,
method: &str,
args: &Vec<String>,
sender: &str,
test_name: String
) -> Result<ExecutionResult, Vec<Diagnostic>>
pub fn build_ast(
&mut self,
snippet: &str,
name: Option<&str>
) -> Result<(QualifiedContractIdentifier, ContractAST, Vec<String>), Vec<String>>
pub fn interpret_ast(
&mut self,
contract_identifier: &QualifiedContractIdentifier,
ast: ContractAST,
snippet: String,
eval_hooks: Option<Vec<Box<dyn EvalHook>>>,
cost_track: bool,
test_name: Option<String>
) -> Result<ExecutionResult, Vec<Diagnostic>>
pub fn interpret(
&mut self,
snippet: String,
name: Option<String>,
eval_hooks: Option<Vec<Box<dyn EvalHook>>>,
cost_track: bool,
test_name: Option<String>,
ast: Option<&ContractAST>
) -> Result<ExecutionResult, Vec<Diagnostic>>
pub fn lookup_api_reference(&self, keyword: &str) -> Option<&String>
pub fn get_api_reference_index(&self) -> Vec<String>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
pub fn advance_chain_tip(&mut self, count: u32) -> u32
pub fn set_tx_sender(&mut self, address: String)
pub fn get_tx_sender(&self) -> String
pub fn get_assets_maps(&self) -> BTreeMap<String, BTreeMap<String, u128>>
pub fn toggle_costs(&mut self, output: &mut Vec<String>)
pub fn encode(&mut self, output: &mut Vec<String>, cmd: &str)
pub fn decode(&mut self, output: &mut Vec<String>, cmd: &str)
pub fn get_costs(&mut self, output: &mut Vec<String>, cmd: &str)
pub fn display_digest(&self) -> Result<String, String>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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