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 resolve_link(
&mut self,
link: &InitialLink,
retrieved: &mut BTreeSet<String>
) -> Result<Vec<(String, String, Vec<String>)>, String>
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 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 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>
) -> 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)
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more