use crate::sys::{jfieldID, jmethodID};
#[doc(hidden)]
#[repr(transparent)]
pub struct JFieldID {
internal: jfieldID,
}
unsafe impl Send for JFieldID {}
unsafe impl Sync for JFieldID {}
impl JFieldID {
pub unsafe fn from_raw(raw: jfieldID) -> Self {
debug_assert!(!raw.is_null(), "from_raw fieldID argument");
Self { internal: raw }
}
pub fn as_raw(&self) -> jfieldID {
self.internal
}
}
#[doc(hidden)]
#[repr(transparent)]
pub struct JMethodID {
internal: jmethodID,
}
unsafe impl Send for JMethodID {}
unsafe impl Sync for JMethodID {}
impl JMethodID {
pub unsafe fn from_raw(raw: jmethodID) -> Self {
debug_assert!(!raw.is_null(), "from_raw methodID argument");
Self { internal: raw }
}
pub fn as_raw(&self) -> jmethodID {
self.internal
}
}