pub fn serialize_op_result<R: Serialize + 'static>( result: Result<R, AnyError>, state: Rc<RefCell<OpState>>) -> OpResult