Struct clarity_repl::clarity::clarity::ClarityInstance [−][src]
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_block
ed or rollback_block
ed 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]
mainnet: bool,
datastore: Datastore,
block_limit: ExecutionCost
) -> ClarityInstance
pub fn begin_block<'a>(
&'a mut self,
current: &StacksBlockId,
next: &StacksBlockId,
header_db: &'a dyn HeadersDB
) -> ClarityBlockConnection<'a>
[src]
&'a mut self,
current: &StacksBlockId,
next: &StacksBlockId,
header_db: &'a dyn HeadersDB
) -> ClarityBlockConnection<'a>
pub fn read_only_connection<'a>(
&'a mut self,
at_block: &StacksBlockId,
header_db: &'a dyn HeadersDB
) -> ClarityReadOnlyConnection<'a>
[src]
&'a mut self,
at_block: &StacksBlockId,
header_db: &'a dyn HeadersDB
) -> ClarityReadOnlyConnection<'a>
pub fn eval_read_only(
&mut self,
at_block: &StacksBlockId,
header_db: &dyn HeadersDB,
contract: &QualifiedContractIdentifier,
program: &str
) -> Result<Value, Error>
[src]
&mut self,
at_block: &StacksBlockId,
header_db: &dyn HeadersDB,
contract: &QualifiedContractIdentifier,
program: &str
) -> Result<Value, Error>
pub fn destroy(self) -> Datastore
[src]
Auto Trait Implementations
impl RefUnwindSafe for ClarityInstance
impl Send for ClarityInstance
impl Sync for ClarityInstance
impl Unpin for ClarityInstance
impl UnwindSafe for ClarityInstance
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,