Struct clarity_repl::repl::session::Session
source · 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 show_costs: bool,
pub executed: Vec<String>,
pub current_epoch: StacksEpochId,
/* 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>§show_costs: bool§executed: Vec<String>§current_epoch: StacksEpochIdImplementations§
source§impl Session
impl Session
pub fn new(settings: SessionSettings) -> Session
pub fn load_boot_contracts(&mut self)
pub fn include_boot_contracts(&mut self, mainnet: bool)
pub fn handle_command(&mut self, command: &str) -> (bool, Vec<String>)
pub fn formatted_interpretation( &mut self, snippet: String, name: Option<String>, cost_track: bool, eval_hooks: Option<Vec<&mut 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 start( &mut self ) -> Result<(String, Vec<(ContractAnalysis, String, String)>), String>
pub fn read(&mut self, output: &mut Vec<String>, cmd: &str)
pub fn stx_transfer( &mut self, amount: u64, recipient: &str ) -> Result<ExecutionResult, Vec<Diagnostic>>
pub fn deploy_contract( &mut self, contract: &ClarityContract, eval_hooks: Option<Vec<&mut dyn EvalHook>>, cost_track: bool, test_name: Option<String>, ast: &mut Option<ContractAST> ) -> Result<ExecutionResult, Vec<Diagnostic>>
pub fn invoke_contract_call( &mut self, contract: &str, method: &str, args: &[String], sender: &str, test_name: String ) -> Result<(ExecutionResult, QualifiedContractIdentifier), Vec<Diagnostic>>
pub fn eval( &mut self, snippet: String, eval_hooks: Option<Vec<&mut dyn EvalHook>>, cost_track: bool ) -> Result<ExecutionResult, Vec<Diagnostic>>
pub fn lookup_functions_or_keywords_docs(&self, exp: &str) -> Option<&String>
pub fn get_api_reference_index(&self) -> Vec<String>
pub fn get_clarity_keywords(&self) -> Vec<String>
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 get_epoch(&mut self, output: &mut Vec<String>)
pub fn set_epoch(&mut self, output: &mut Vec<String>, cmd: &str)
pub fn update_epoch(&mut self, epoch: StacksEpochId)
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more