Struct stacks_rpc_client::clarity::vm::database::RollbackWrapper
pub struct RollbackWrapper<'a> { /* private fields */ }
Implementations§
§impl<'a> RollbackWrapper<'a>
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>
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>
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>,
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>
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
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>
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
impl From<RollbackWrapper<'_>> for RollbackWrapperPersistedLog
§fn from(o: RollbackWrapper<'_>) -> 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more