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: StacksEpochId

Implementations§

source§

impl Session

source

pub fn new(settings: SessionSettings) -> Session

source

pub fn load_boot_contracts(&mut self)

source

pub fn include_boot_contracts(&mut self, mainnet: bool)

source

pub fn handle_command(&mut self, command: &str) -> (bool, Vec<String>)

source

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>>

source

pub fn debug(&mut self, output: &mut Vec<String>, cmd: &str)

source

pub fn trace(&mut self, output: &mut Vec<String>, cmd: &str)

source

pub fn start( &mut self ) -> Result<(String, Vec<(ContractAnalysis, String, String)>), String>

source

pub fn read(&mut self, output: &mut Vec<String>, cmd: &str)

source

pub fn stx_transfer( &mut self, amount: u64, recipient: &str ) -> Result<ExecutionResult, Vec<Diagnostic>>

source

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>>

source

pub fn invoke_contract_call( &mut self, contract: &str, method: &str, args: &[String], sender: &str, test_name: String ) -> Result<(ExecutionResult, QualifiedContractIdentifier), Vec<Diagnostic>>

source

pub fn eval( &mut self, snippet: String, eval_hooks: Option<Vec<&mut dyn EvalHook>>, cost_track: bool ) -> Result<ExecutionResult, Vec<Diagnostic>>

source

pub fn lookup_functions_or_keywords_docs(&self, exp: &str) -> Option<&String>

source

pub fn get_api_reference_index(&self) -> Vec<String>

source

pub fn get_clarity_keywords(&self) -> Vec<String>

source

pub fn advance_chain_tip(&mut self, count: u32) -> u32

source

pub fn set_tx_sender(&mut self, address: String)

source

pub fn get_tx_sender(&self) -> String

source

pub fn get_assets_maps(&self) -> BTreeMap<String, BTreeMap<String, u128>>

source

pub fn toggle_costs(&mut self, output: &mut Vec<String>)

source

pub fn get_epoch(&mut self, output: &mut Vec<String>)

source

pub fn set_epoch(&mut self, output: &mut Vec<String>, cmd: &str)

source

pub fn update_epoch(&mut self, epoch: StacksEpochId)

source

pub fn encode(&mut self, output: &mut Vec<String>, cmd: &str)

source

pub fn decode(&mut self, output: &mut Vec<String>, cmd: &str)

source

pub fn get_costs(&mut self, output: &mut Vec<String>, cmd: &str)

source

pub fn display_digest(&self) -> Result<String, String>

Trait Implementations§

source§

impl Clone for Session

source§

fn clone(&self) -> Session

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Session

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more