Struct clarity_repl::clarity::clarity::ClarityInstance[][src]

pub struct ClarityInstance { /* fields omitted */ }

A high-level interface for interacting with the Clarity VM.

ClarityInstance takes ownership of a MARF + Sqlite store used for it’s data operations. The ClarityInstance defines a begin_block(bhh, bhh, bhh) -> ClarityBlockConnection function. ClarityBlockConnections are used for executing transactions within the context of a single block. Only one ClarityBlockConnection may be open at a time (enforced by the borrow checker) and ClarityBlockConnections must be commit_blocked or rollback_blocked before discarding begining the next connection (enforced by runtime panics).

Implementations

impl ClarityInstance[src]

pub fn new(
    mainnet: bool,
    datastore: Datastore,
    block_limit: ExecutionCost
) -> ClarityInstance
[src]

pub fn begin_block<'a>(
    &'a mut self,
    current: &StacksBlockId,
    next: &StacksBlockId,
    header_db: &'a dyn HeadersDB
) -> ClarityBlockConnection<'a>
[src]

pub fn read_only_connection<'a>(
    &'a mut self,
    at_block: &StacksBlockId,
    header_db: &'a dyn HeadersDB
) -> ClarityReadOnlyConnection<'a>
[src]

pub fn eval_read_only(
    &mut self,
    at_block: &StacksBlockId,
    header_db: &dyn HeadersDB,
    contract: &QualifiedContractIdentifier,
    program: &str
) -> Result<Value, Error>
[src]

pub fn destroy(self) -> Datastore[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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