mono_rt/types/object.rs
1use super::mono_handle;
2use crate::{Result, api};
3
4mono_handle!(MonoObject);
5
6impl MonoObject {
7 /// Unboxes this object and returns a raw pointer to its value-type data.
8 ///
9 /// # Errors
10 ///
11 /// Returns [`crate::MonoError::Uninitialized`] if the Mono API has not been initialized.
12 pub fn unbox(self) -> Result<*mut c_void> {
13 Ok(api()?.object_unbox(self.as_ptr()))
14 }
15}