Struct clarity_repl::clarity::database::RollbackWrapper
source · [−]pub struct RollbackWrapper<'a> { /* private fields */ }
Implementations
sourceimpl<'a> RollbackWrapper<'a>
impl<'a> RollbackWrapper<'a>
pub fn new(store: &'a mut dyn ClarityBackingStore) -> RollbackWrapper<'_>
pub fn from_persisted_log(
store: &'a mut dyn ClarityBackingStore,
log: RollbackWrapperPersistedLog
) -> RollbackWrapper<'_>
pub fn nest(&mut self)
pub fn rollback(&mut self)
pub fn depth(&self) -> usize
pub fn commit(&mut self)
sourceimpl<'a> RollbackWrapper<'a>
impl<'a> RollbackWrapper<'a>
pub fn put(&mut self, key: &str, value: &str)
sourcepub fn set_block_hash(
&mut self,
bhh: StacksBlockId,
query_pending_data: bool
) -> Result<StacksBlockId>
pub fn set_block_hash(
&mut self,
bhh: StacksBlockId,
query_pending_data: bool
) -> Result<StacksBlockId>
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<T>(&mut self, key: &str) -> Option<T>where
T: ClarityDeserializable<T>,
pub fn get_value(&mut self, key: &str, expected: &TypeSignature) -> Option<Value>
pub fn get_current_block_height(&mut self) -> u32
pub fn get_block_header_hash(
&mut self,
block_height: u32
) -> Option<StacksBlockId>
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>>
pub fn has_entry(&mut self, key: &str) -> bool
pub fn has_metadata_entry(
&mut self,
contract: &QualifiedContractIdentifier,
key: &str
) -> bool
Trait Implementations
sourceimpl From<RollbackWrapper<'_>> for RollbackWrapperPersistedLog
impl From<RollbackWrapper<'_>> for RollbackWrapperPersistedLog
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more