flapigen 0.11.0

Tool for connecting libraries written in Rust with other languages
Documentation
r#"impl SwigForeignClass for Rc<RefCell<Boo>> {
    type PointedType = RefCell<Boo>;
    fn jni_class() -> jclass {
        swig_jni_find_class!(FOREIGN_CLASS_BOO, "org/example/Boo")
    }
    fn jni_class_pointer_field() -> jfieldID {
        swig_jni_get_field_id!(
            FOREIGN_CLASS_BOO_MNATIVEOBJ_FIELD,
            FOREIGN_CLASS_BOO,
            "mNativeObj",
            "J"
        )
    }
    fn box_object(this: Self) -> jlong {
        let this: *const RefCell<Boo> = Rc::into_raw(this);
        this as jlong
    }
    fn unbox_object(x: jlong) -> Self {
        let x: *mut RefCell<Boo> = unsafe { jlong_to_pointer::<RefCell<Boo>>(x).as_mut().unwrap() };
        let x: Rc<RefCell<Boo>> = unsafe { Rc::from_raw(x) };
        x
    }
    fn to_pointer(x: jlong) -> ::std::ptr::NonNull<Self::PointedType> {
        let x: *mut RefCell<Boo> = unsafe { jlong_to_pointer::<RefCell<Boo>>(x).as_mut().unwrap() };
        ::std::ptr::NonNull::<Self::PointedType>::new(x).unwrap()
    }
}"#;