flapigen 0.11.0

Tool for connecting libraries written in Rust with other languages
Documentation
r#"impl Foo for C_Foo {
    #[allow(unused_mut)]
    fn unpack(&self, a0: &str) -> Result<String, Error> {
        let mut a0: CRustStrView = CRustStrView::from_str(a0);
        let ret: CRustResultCRustString4232mut3232c_void = (self.unpack)(a0, self.opaque);
        let mut ret: Result<String, Error> = unsafe {
            if ret.is_ok != 0 {
                let mut x: String = unsafe {
                    String::from_raw_parts(
                        ret.data.ok.data as *mut u8,
                        ret.data.ok.len,
                        ret.data.ok.capacity,
                    )
                };
                Ok(x)
            } else {
                assert!(!ret.data.err.is_null());
                let x: *mut Error = ret.data.err as *mut Error;
                let x: Box<Error> = 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<Error> = unsafe { Box::from_raw(x) };
                let x: Error = *x;
                Err(x)
            }
        };
        ret
    }
}"#;