pub fn recycle_instance(
        &mut self,
        instance: Instance<MockApi, MockStorage, MockQuerier>,
    ) -> TestingResult<()> {
        if self.backend.is_some() {
            return Err(TestingError::ContractError(
                ERR_RECYCLE_BEFORE_GENERATE_INSTANCE.to_string(),
            ));
        };
        let backend = instance.recycle().ok_or_else(|| {
            TestingError::ContractError(
                "Cannot recycle the instance with cosmwasm_vm::Instance::recycle".to_string(),
            )
        })?;
        self.backend = Some(backend);
        Ok(())
    }
/// recycle passed instance and take the ownership of the backend
///
/// instance of a contract must be singleton and this is for recycling the instance.
recycle passed instance and take the ownership of the backend
instance of a contract must be singleton and this is for recycling the instance.
recycle passed instance and take the ownership of the backend instance of a contract must be singleton and this is for recycling the instance .
pub fn recycle_instance(
        &mut self,
        instance: Instance<MockApi, MockStorage, MockQuerier>,
    ) -> TestingResult<()> {
        if self.backend.is_some() {
            return Err(TestingError::ContractError(
                ERR_RECYCLE_BEFORE_GENERATE_INSTANCE.to_string(),
            ));
        };
        let backend = instance.recycle().ok_or_else(|| {
            TestingError::ContractError(
                "Cannot recycle the instance with cosmwasm_vm::Instance::recycle".to_string(),
            )
        })?;
        self.backend = Some(backend);
        Ok(())
    }
pub fn recycle_instance ( & mut self , instance : Instance < MockApi , MockStorage , MockQuerier > , ) -> TestingResult < ( ) > { if self . backend . is_some ( ) { return Err ( TestingError :: ContractError ( ERR_RECYCLE_BEFORE_GENERATE_INSTANCE . to_string ( ) , ) ) ; } ; let backend = instance . recycle ( ) . ok_or_else ( | | { TestingError :: ContractError ( " " . to_string ( ) , ) } ) ? ; self . backend = Some ( backend ) ; Ok ( ( ) ) }
recycle passed instance and take the ownership of the backend
instance of a contract must be singleton and this is for recycling the instance.
recycle passed instance and take the ownership of the backend instance of a contract must be singleton and this is for recycling the instance .
&mut self
instance
Instance<MockApi, MockStorage, MockQuerier>