///
/// If operation.key exists in the tree and the operation succeeds,
/// returns Success(Some(v)), where v is the value associated with operation.key
/// before the operation.
/// If operation.key does not exists in the tree and the operation succeeds, returns Success(None).
/// Returns Failure if the operation fails or the proof does not verify.
/// After one failure, all subsequent operations will fail and digest
/// is None.
///
/// @param operation
/// @return - Success(Some(old value)), Success(None), or Failure
///
If operation.key exists in the tree and the operation succeeds,
returns Success(Some(v)), where v is the value associated with operation.key
before the operation.
If operation.key does not exists in the tree and the operation succeeds, returns Success(None).
Returns Failure if the operation fails or the proof does not verify.
After one failure, all subsequent operations will fail and digest
is None.
If operation . key exists in the tree and the operation succeeds returns Success ( Some ( v )) where v is the value associated with operation . key before the operation . If operation . key does not exists in the tree and the operation succeeds returns Success ( None ) . Returns Failure if the operation fails or the proof does not verify . After one failure all subsequent operations will fail and digest is None .
pub fn perform_one_operation(&mut self, operation: &Operation) -> Result<Option<ADValue>> {
        self.replay_index = self.directions_index;
		let root = self.base.tree.root.as_ref().ok_or(anyhow!("Empty tree"))?.clone();
		let res = self.return_result_of_one_operation(operation, &root);
		if res.is_err() {
			self.base.tree.root = None;
			self.base.tree.height = 0;
		}
		res
    }
pub fn perform_one_operation ( & mut self , operation : & Operation ) -> Result < Option < ADValue > > { self . replay_index = self . directions_index ; let root = self . base . tree . root . as_ref ( ) . ok_or ( anyhow ! ( " " ) ) ? . clone ( ) ; let res = self . return_result_of_one_operation ( operation , & root ) ; if res . is_err ( ) { self . base . tree . root = None ; self . base . tree . height = 0 ; } res }
If operation.key exists in the tree and the operation succeeds,
returns Success(Some(v)), where v is the value associated with operation.key
before the operation.
If operation . key exists in the tree and the operation succeeds returns Success ( Some ( v )) where v is the value associated with operation . key before the operation .
Success(Some(old value)), Success(None), or Failure
Success ( Some ( old value )) Success ( None ) or Failure
&mut self
operation
&Operation
None