pub struct Object { /* private fields */ }

Implementations§

source§

impl Object

source

pub fn new(handle: StructHandle) -> Object

source

pub fn try_new(handle: StructHandle) -> Option<Object>

source

pub unsafe fn new_uninitialized(handle: StructHandle) -> Object

source

pub unsafe fn new_raw(handle: StructHandle, memory: Vec<u8>) -> Option<Self>

source

pub fn with_value<T: 'static>(handle: StructHandle, value: T) -> Option<Self>

source

pub fn consume<T: 'static>(self) -> Result<T, Self>

source

pub unsafe fn into_inner(self) -> (StructHandle, Vec<u8>)

source

pub fn struct_handle(&self) -> &StructHandle

source

pub unsafe fn memory(&self) -> &[u8]

source

pub unsafe fn memory_mut(&mut self) -> &mut [u8]

source

pub unsafe fn field_memory<'a>( &'a self, query: StructFieldQuery<'a> ) -> Option<&[u8]>

source

pub unsafe fn field_memory_mut<'a>( &'a mut self, query: StructFieldQuery<'a> ) -> Option<&mut [u8]>

source

pub fn read<T: 'static>(&self) -> Option<&T>

source

pub fn write<T: 'static>(&mut self) -> Option<&mut T>

source

pub fn read_field<'a, T: 'static>(&'a self, field: &str) -> Option<&'a T>

source

pub fn write_field<'a, T: 'static>( &'a mut self, field: &str ) -> Option<&'a mut T>

source

pub unsafe fn as_ptr(&self) -> *const u8

source

pub unsafe fn as_mut_ptr(&mut self) -> *mut u8

source

pub unsafe fn prevent_drop(&mut self)

Trait Implementations§

source§

impl Drop for Object

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Initialize for Object

source§

fn initialize(&mut self)

source§

unsafe fn initialize_raw(data: *mut ())

Safety Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Finalize for T

source§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.