Traits that can be used to check if a type is an object This trait is unsafe because it is used to access the object header and the object header is unsafe to access
| 48 | /// This trait is unsafe because it is used to access the object header |
| 49 | /// and the object header is unsafe to access |
| 50 | pub unsafe trait ObjectCore: Sized + 'static { |
| 51 | /// the type key of the object |
| 52 | const TYPE_KEY: &'static str; |
| 53 | // return the type index of the object |
| 54 | fn type_index() -> i32; |
| 55 | /// Return the object header |
| 56 | /// This function is implemented as a static function so |
| 57 | /// |
| 58 | /// # Arguments |
| 59 | /// * `this` - The object to get the header |
| 60 | /// |
| 61 | /// # Returns |
| 62 | /// * `&mut TVMFFIObject` - The object header |
| 63 | /// \return The object header |
| 64 | unsafe fn object_header_mut(this: &mut Self) -> &mut TVMFFIObject; |
| 65 | } |
| 66 | |
| 67 | /// Traits for objects with extra items that follows the object |
| 68 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected