intuicio_core::object

Struct Object

Source
pub struct Object { /* private fields */ }

Implementations§

Source§

impl Object

Source

pub fn new(handle: TypeHandle) -> Self

Source

pub fn try_new(handle: TypeHandle) -> Option<Self>

Source

pub unsafe fn new_uninitialized(handle: TypeHandle) -> Option<Self>

§Safety
Source

pub unsafe fn new_raw(handle: TypeHandle, memory: *mut u8) -> Self

§Safety
Source

pub unsafe fn from_bytes(handle: TypeHandle, bytes: &[u8]) -> Option<Self>

§Safety
Source

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

Source

pub unsafe fn initialize(&mut self)

§Safety
Source

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

Source

pub unsafe fn into_inner(self) -> (TypeHandle, *mut u8)

§Safety
Source

pub fn type_handle(&self) -> &TypeHandle

Source

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

§Safety
Source

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

§Safety
Source

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

§Safety
Source

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

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

§Safety
Source

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

§Safety
Source

pub unsafe fn prevent_drop(&mut self)

§Safety

Trait Implementations§

Source§

impl Debug for Object

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Object

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.