pub trait RawObject {
// Required method
fn handle(&self) -> &ObjectHandle;
// Provided methods
fn id(&self) -> ObjID { ... }
fn base_ptr<T>(&self) -> *const T { ... }
fn base_mut_ptr<T>(&self) -> *mut T { ... }
fn meta_ptr(&self) -> *const MetaInfo { ... }
fn meta_mut_ptr(&self) -> *mut MetaInfo { ... }
fn fote_ptr(&self, idx: usize) -> Option<*const FotEntry> { ... }
fn fote_ptr_mut(&self, idx: usize) -> Option<*mut FotEntry> { ... }
fn lea(&self, offset: usize, _len: usize) -> Option<*const u8> { ... }
fn lea_mut(&self, offset: usize, _len: usize) -> Option<*mut u8> { ... }
fn ptr_local(&self, ptr: *const u8) -> Option<usize> { ... }
}
Expand description
Operations common to all objects, with raw pointers.
Required Methods§
Sourcefn handle(&self) -> &ObjectHandle
fn handle(&self) -> &ObjectHandle
Get the underlying runtime handle for this object.
Provided Methods§
Sourcefn base_mut_ptr<T>(&self) -> *mut T
fn base_mut_ptr<T>(&self) -> *mut T
Get a mut pointer to the object base.
Sourcefn meta_mut_ptr(&self) -> *mut MetaInfo
fn meta_mut_ptr(&self) -> *mut MetaInfo
Get a mut pointer to the object metadata.
Sourcefn fote_ptr(&self, idx: usize) -> Option<*const FotEntry>
fn fote_ptr(&self, idx: usize) -> Option<*const FotEntry>
Get a const pointer to a given FOT entry.
Sourcefn fote_ptr_mut(&self, idx: usize) -> Option<*mut FotEntry>
fn fote_ptr_mut(&self, idx: usize) -> Option<*mut FotEntry>
Get a mut pointer to a given FOT entry.
Sourcefn lea(&self, offset: usize, _len: usize) -> Option<*const u8>
fn lea(&self, offset: usize, _len: usize) -> Option<*const u8>
Get a const pointer to given range of the object.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.