/// Insert an operation at the currently configured position.
Insert an operation at the currently configured position.
Insert an operation at the currently configured position .
pub fn insert(&mut self, op: impl WrapRaw<RawType = MlirOperation>) {
        let null_op = MlirOperation {
            ptr: std::ptr::null_mut(),
        };
        let op = op.raw();
        let block = self.insert_block.expect("insertion block not set");
        unsafe {
            match self.insert_point {
                InsertPoint::BlockStart => mlirBlockInsertOwnedOperationAfter(block, null_op, op),
                InsertPoint::BlockEnd => mlirBlockInsertOwnedOperationBefore(block, null_op, op),
                InsertPoint::After(ref_op) => mlirBlockInsertOwnedOperationAfter(block, ref_op, op),
                InsertPoint::Before(ref_op) => {
                    mlirBlockInsertOwnedOperationBefore(block, ref_op, op)
                }
            }
        }
        self.insert_point = InsertPoint::After(op);
    }
pub fn insert ( & mut self , op : impl WrapRaw < RawType = MlirOperation > ) { let null_op = MlirOperation { ptr : std :: ptr :: null_mut ( ) , } ; let op = op . raw ( ) ; let block = self . insert_block . expect ( " " ) ; unsafe { match self . insert_point { InsertPoint :: BlockStart => mlirBlockInsertOwnedOperationAfter ( block , null_op , op ) , InsertPoint :: BlockEnd => mlirBlockInsertOwnedOperationBefore ( block , null_op , op ) , InsertPoint :: After ( ref_op ) => mlirBlockInsertOwnedOperationAfter ( block , ref_op , op ) , InsertPoint :: Before ( ref_op ) => { mlirBlockInsertOwnedOperationBefore ( block , ref_op , op ) } } } self . insert_point = InsertPoint :: After ( op ) ; }
Insert an operation at the currently configured position.
Insert an operation at the currently configured position .
&mut self
op
impl WrapRaw<RawType = MlirOperation>