pub struct StateHolder { /* private fields */ }Implementations§
Source§impl StateHolder
impl StateHolder
pub const CORRUPTED_ERR_MSG: &'static str = "Morpheus state is corrupt. All incoming changes will be ignored."
pub fn is_corrupted(&self) -> bool
pub fn ensure_not_corrupted(&self) -> Result<()>
pub fn state(&self) -> Result<&State>
pub fn dry_run(&self, asset: &MorpheusAsset) -> Result<Vec<OperationError>>
pub fn block_applying(&mut self, height: BlockHeight) -> Result<()>
pub fn apply_transaction( &mut self, txid: &str, asset: &MorpheusAsset, ) -> Result<()>
pub fn block_reverting(&mut self, height: BlockHeight) -> Result<()>
pub fn revert_transaction( &mut self, txid: &str, asset: &MorpheusAsset, ) -> Result<()>
Trait Implementations§
Source§impl Default for StateHolder
impl Default for StateHolder
Source§fn default() -> StateHolder
fn default() -> StateHolder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StateHolder
impl RefUnwindSafe for StateHolder
impl Send for StateHolder
impl Sync for StateHolder
impl Unpin for StateHolder
impl UnwindSafe for StateHolder
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