/// Aborts an unsealed object in the object store. If the abort succeeds, then
/// it will be as if the object was never created at all.
Aborts an unsealed object in the object store. If the abort succeeds, then
it will be as if the object was never created at all.
Aborts an unsealed object in the object store . If the abort succeeds then it will be as if the object was never created at all .
pub fn abort(mut self) -> Result<(), PlasmaError> {
        if !self.is_mutable {
            return Err(PlasmaError::NotMutable);
        }
        // release the object before it is aborted
        let status = plasma::release(self.pc.as_ref().unwrap(), self.id.inner());
        match status.code {
            plasma::StatusCode::OK => {
                // once the object has been released, call abort
                let status = plasma::abort(self.pc.as_ref().unwrap(), self.id.inner());
                match status.code {
                    plasma::StatusCode::OK => {
                        self.is_aborted = true;
                        Ok(())
                    }
                    _ => Err(PlasmaError::UnknownError(status.msg)),
                }
            }
            _ => Err(PlasmaError::UnknownError(format!(
                "release failed: {}",
                status.msg
            ))),
        }
    }
pub fn abort ( mut self ) -> Result < ( ) , PlasmaError > { if ! self . is_mutable { return Err ( PlasmaError :: NotMutable ) ; } // release the object before it is aborted let status = plasma :: release ( self . pc . as_ref ( ) . unwrap ( ) , self . id . inner ( ) ) ; match status . code { plasma :: StatusCode :: OK => { // once the object has been released, call abort let status = plasma :: abort ( self . pc . as_ref ( ) . unwrap ( ) , self . id . inner ( ) ) ; match status . code { plasma :: StatusCode :: OK => { self . is_aborted = true ; Ok ( ( ) ) } _ => Err ( PlasmaError :: UnknownError ( status . msg ) ) , } } _ => Err ( PlasmaError :: UnknownError ( format ! ( " " status msg ) ) ) , } }
Aborts an unsealed object in the object store.
Aborts an unsealed object in the object store .
mut self