pub struct RollbackWrapper<'a> { /* private fields */ }

Implementations§

§

impl<'a> RollbackWrapper<'a>

pub fn new(store: &'a mut dyn ClarityBackingStore) -> RollbackWrapper<'a>

pub fn from_persisted_log( store: &'a mut dyn ClarityBackingStore, log: RollbackWrapperPersistedLog ) -> RollbackWrapper<'a>

pub fn get_cc_special_cases_handler( &self ) -> Option<&'static dyn Fn(&mut GlobalContext<'_, '_>, Option<&PrincipalData>, Option<&PrincipalData>, &QualifiedContractIdentifier, &str, &[Value], &Value) -> Result<(), Error>>

pub fn nest(&mut self)

pub fn rollback(&mut self)

pub fn depth(&self) -> usize

pub fn commit(&mut self)

§

impl<'a> RollbackWrapper<'a>

pub fn put(&mut self, key: &str, value: &str)

pub fn set_block_hash( &mut self, bhh: StacksBlockId, query_pending_data: bool ) -> Result<StacksBlockId, Error>

query_pending_data indicates whether the rollback wrapper should query the rollback wrapper’s pending data on reads. This is set to false during (at-block …) closures, and true otherwise.

pub fn get_with_proof<T>(&mut self, key: &str) -> Option<(T, Vec<u8>)>where T: ClarityDeserializable<T>,

this function will only return commitment proofs for values already materialized in the underlying store. otherwise it returns None.

pub fn get<T>(&mut self, key: &str) -> Option<T>where T: ClarityDeserializable<T>,

pub fn get_value( &mut self, key: &str, expected: &TypeSignature ) -> Result<Option<ValueResult>, SerializationError>

Get a Clarity value from the underlying Clarity KV store. Returns Some if found, with the Clarity Value and the serialized byte length of the value.

pub fn get_current_block_height(&mut self) -> u32

This is the height we are currently constructing. It comes from the MARF.

pub fn get_block_header_hash( &mut self, block_height: u32 ) -> Option<StacksBlockId>

Is None if block_height >= the “currently” under construction Stacks block height.

pub fn prepare_for_contract_metadata( &mut self, contract: &QualifiedContractIdentifier, content_hash: Sha512Trunc256Sum )

pub fn insert_metadata( &mut self, contract: &QualifiedContractIdentifier, key: &str, value: &str )

pub fn get_metadata( &mut self, contract: &QualifiedContractIdentifier, key: &str ) -> Result<Option<String>, Error>

pub fn get_metadata_manual( &mut self, at_height: u32, contract: &QualifiedContractIdentifier, key: &str ) -> Result<Option<String>, Error>

pub fn has_entry(&mut self, key: &str) -> bool

pub fn has_metadata_entry( &mut self, contract: &QualifiedContractIdentifier, key: &str ) -> bool

Trait Implementations§

§

impl From<RollbackWrapper<'_>> for RollbackWrapperPersistedLog

§

fn from(o: RollbackWrapper<'_>) -> RollbackWrapperPersistedLog

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for RollbackWrapper<'a>

§

impl<'a> !Send for RollbackWrapper<'a>

§

impl<'a> !Sync for RollbackWrapper<'a>

§

impl<'a> Unpin for RollbackWrapper<'a>

§

impl<'a> !UnwindSafe for RollbackWrapper<'a>

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.

§

impl<T> Instrument for T

§

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

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

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

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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