pub struct Object { /* private fields */ }
Implementations§
Source§impl Object
impl Object
pub fn new(handle: TypeHandle) -> Self
pub fn try_new(handle: TypeHandle) -> Option<Self>
Sourcepub unsafe fn new_uninitialized(handle: TypeHandle) -> Option<Self>
pub unsafe fn new_uninitialized(handle: TypeHandle) -> Option<Self>
§Safety
Sourcepub unsafe fn from_bytes(handle: TypeHandle, bytes: &[u8]) -> Option<Self>
pub unsafe fn from_bytes(handle: TypeHandle, bytes: &[u8]) -> Option<Self>
§Safety
pub fn with_value<T: 'static>(handle: TypeHandle, value: T) -> Option<Self>
Sourcepub unsafe fn initialize(&mut self)
pub unsafe fn initialize(&mut self)
§Safety
pub fn consume<T: 'static>(self) -> Result<T, Self>
Sourcepub unsafe fn into_inner(self) -> (TypeHandle, *mut u8)
pub unsafe fn into_inner(self) -> (TypeHandle, *mut u8)
§Safety
pub fn type_handle(&self) -> &TypeHandle
Sourcepub unsafe fn memory_mut(&mut self) -> &mut [u8] ⓘ
pub unsafe fn memory_mut(&mut self) -> &mut [u8] ⓘ
§Safety
Sourcepub unsafe fn field_memory<'a>(
&'a self,
query: StructFieldQuery<'a>,
) -> Option<&[u8]>
pub unsafe fn field_memory<'a>( &'a self, query: StructFieldQuery<'a>, ) -> Option<&[u8]>
§Safety
Sourcepub unsafe fn field_memory_mut<'a>(
&'a mut self,
query: StructFieldQuery<'a>,
) -> Option<&mut [u8]>
pub unsafe fn field_memory_mut<'a>( &'a mut self, query: StructFieldQuery<'a>, ) -> Option<&mut [u8]>
§Safety
pub fn read<T: 'static>(&self) -> Option<&T>
pub fn write<T: 'static>(&mut self) -> Option<&mut T>
pub fn read_field<'a, T: 'static>(&'a self, field: &str) -> Option<&'a T>
pub fn write_field<'a, T: 'static>( &'a mut self, field: &str, ) -> Option<&'a mut T>
Sourcepub unsafe fn as_mut_ptr(&mut self) -> *mut u8
pub unsafe fn as_mut_ptr(&mut self) -> *mut u8
§Safety
Sourcepub unsafe fn prevent_drop(&mut self)
pub unsafe fn prevent_drop(&mut self)
§Safety
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl !Send for Object
impl !Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more