r#"impl Foo for C_Foo { #[allow(unused_mut)] fn unpack(&self, a0: &str) -> Result { let mut a0: CRustStrView = CRustStrView::from_str(a0); let ret: CRustResultCRustStrView4232mut3232c_void = (self.unpack)(a0, self.opaque); let mut ret: Result = unsafe { if ret.is_ok != 0 { let mut x: &str = unsafe { let slice: &[u8] = ::std::slice::from_raw_parts( ret.data.ok.data as *const u8, ret.data.ok.len, ); ::std::str::from_utf8_unchecked(slice) }; let mut x: String = String::from(x); Ok(x) } else { assert!(!ret.data.err.is_null()); let x: *mut Error = ret.data.err as *mut Error; let x: Box = unsafe { Box::from_raw(x) }; let x: Error = *x; Err(x) } }; ret } #[allow(unused_mut)] fn remove(&self) -> Result<(), Error> { let ret: CRustVoidOkResult4232mut3232c_void = (self.remove)(self.opaque); let mut ret: Result<(), Error> = unsafe { if ret.is_ok != 0 { Ok(()) } else { assert!(!ret.data.err.is_null()); let x: *mut Error = ret.data.err as *mut Error; let x: Box = unsafe { Box::from_raw(x) }; let x: Error = *x; Err(x) } }; ret } }"#;