[−][src]Struct clarity_repl::clarity::database::datastore::Datastore
Implementations
impl Datastore
[src]
impl Datastore
[src]
pub fn open(
path_str: &str,
miner_tip: Option<&StacksBlockId>
) -> Result<Datastore>
[src]
path_str: &str,
miner_tip: Option<&StacksBlockId>
) -> Result<Datastore>
pub fn as_clarity_db<'a>(
&'a mut self,
headers_db: &'a dyn HeadersDB
) -> ClarityDatabase<'a>
[src]
&'a mut self,
headers_db: &'a dyn HeadersDB
) -> ClarityDatabase<'a>
pub fn as_analysis_db<'a>(&'a mut self) -> AnalysisDatabase<'a>
[src]
pub fn begin(&mut self, current: &StacksBlockId, next: &StacksBlockId)
[src]
begin, commit, rollback a save point identified by key this is used to clean up any data from aborted blocks (NOT aborted transactions that is handled by the clarity vm directly). The block header hash is used for identifying savepoints. this cannot be used to rollback to arbitrary prior block hash, because that blockhash would already have committed and no longer exist in the save point stack. this is a "lower-level" rollback than the roll backs performed in ClarityDatabase or AnalysisDatabase -- this is done at the backing store level.
pub fn rollback(&mut self)
[src]
pub fn commit_mined_block(&mut self, will_move_to: &StacksBlockId)
[src]
pub fn commit_to(&mut self, final_bhh: &StacksBlockId)
[src]
pub fn get_chain_tip(&self) -> &StacksBlockId
[src]
pub fn set_chain_tip(&mut self, bhh: &StacksBlockId)
[src]
pub fn put(&mut self, key: &str, value: &str)
[src]
pub fn make_contract_hash_key(contract: &QualifiedContractIdentifier) -> String
[src]
Trait Implementations
impl ClarityBackingStore for Datastore
[src]
fn put_all(&mut self, items: Vec<(String, String)>)
[src]
fn get(&mut self, key: &str) -> Option<String>
[src]
fetch K-V out of the committed datastore
fn has_entry(&mut self, key: &str) -> bool
[src]
fn set_block_hash(&mut self, bhh: StacksBlockId) -> Result<StacksBlockId>
[src]
change the current MARF context to service reads from a different chain_tip used to implement time-shifted evaluation. returns the previous block header hash on success
fn get_block_at_height(&mut self, height: u32) -> Option<StacksBlockId>
[src]
fn get_current_block_height(&mut self) -> u32
[src]
this function returns the current block height, as viewed by this marfed-kv structure, i.e., it changes on time-shifted evaluation. the open_chain_tip functions always return data about the chain tip that is currently open for writing.
fn get_open_chain_tip_height(&mut self) -> u32
[src]
fn get_open_chain_tip(&mut self) -> StacksBlockId
[src]
fn make_contract_commitment(
&mut self,
contract_hash: Sha512Trunc256Sum
) -> String
[src]
&mut self,
contract_hash: Sha512Trunc256Sum
) -> String
The contract commitment is the hash of the contract, plus the block height in which the contract was initialized.
fn insert_metadata(
&mut self,
contract: &QualifiedContractIdentifier,
key: &str,
value: &str
)
[src]
&mut self,
contract: &QualifiedContractIdentifier,
key: &str,
value: &str
)
fn get_metadata(
&mut self,
contract: &QualifiedContractIdentifier,
key: &str
) -> Result<Option<String>>
[src]
&mut self,
contract: &QualifiedContractIdentifier,
key: &str
) -> Result<Option<String>>
impl Clone for Datastore
[src]
impl Debug for Datastore
[src]
Auto Trait Implementations
impl RefUnwindSafe for Datastore
impl Send for Datastore
impl Sync for Datastore
impl Unpin for Datastore
impl UnwindSafe for Datastore
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,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,