Trait RawObject

Source
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§

Source

fn handle(&self) -> &ObjectHandle

Get the underlying runtime handle for this object.

Provided Methods§

Source

fn id(&self) -> ObjID

Get the object ID.

Source

fn base_ptr<T>(&self) -> *const T

Get a const pointer to the object base.

Source

fn base_mut_ptr<T>(&self) -> *mut T

Get a mut pointer to the object base.

Source

fn meta_ptr(&self) -> *const MetaInfo

Get a const pointer to the object metadata.

Source

fn meta_mut_ptr(&self) -> *mut MetaInfo

Get a mut pointer to the object metadata.

Source

fn fote_ptr(&self, idx: usize) -> Option<*const FotEntry>

Get a const pointer to a given FOT entry.

Source

fn fote_ptr_mut(&self, idx: usize) -> Option<*mut FotEntry>

Get a mut pointer to a given FOT entry.

Source

fn lea(&self, offset: usize, _len: usize) -> Option<*const u8>

Get a const pointer to given range of the object.

Source

fn lea_mut(&self, offset: usize, _len: usize) -> Option<*mut u8>

Get a mut pointer to given range of the object.

Source

fn ptr_local(&self, ptr: *const u8) -> Option<usize>

If the pointer is local to this object, return the offset into the object. Otherwise, return None.

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.

Implementors§

Source§

impl RawObject for ObjectHandle

Source§

impl<Base> RawObject for MutObject<Base>

Source§

impl<Base> RawObject for Object<Base>

Source§

impl<T> RawObject for TxObject<T>