pub struct Ref<'obj, T> { /* private fields */ }
Implementations§
Source§impl<'obj, T> Ref<'obj, T>
impl<'obj, T> Ref<'obj, T>
pub fn raw(&self) -> *const T
pub fn offset(&self) -> u64
pub fn handle(&self) -> &ObjectHandle
pub unsafe fn from_raw_parts(ptr: *const T, handle: &'obj ObjectHandle) -> Self
pub unsafe fn from_ptr(ptr: *const T) -> Self
pub unsafe fn cast<U>(self) -> Ref<'obj, U>
pub unsafe fn into_mut(self) -> RefMut<'obj, T>
pub unsafe fn as_mut(&self) -> RefMut<'obj, T>
pub fn global(&self) -> GlobalPtr<T>
pub fn owned<'b>(&self) -> Ref<'b, T>
pub fn from_handle(handle: ObjectHandle, ptr: *const T) -> Self
pub fn into_tx(self) -> Result<TxRef<T>>
pub fn as_tx(&self) -> Result<TxRef<T>>
pub unsafe fn add(self, offset: usize) -> Self
pub unsafe fn byte_add(self, offset: usize) -> Self
Trait Implementations§
Source§impl<'a, T> AsRef<ObjectHandle> for Ref<'a, T>
impl<'a, T> AsRef<ObjectHandle> for Ref<'a, T>
Source§fn as_ref(&self) -> &ObjectHandle
fn as_ref(&self) -> &ObjectHandle
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<'a, T> Into<ObjectHandle> for &Ref<'a, T>
impl<'a, T> Into<ObjectHandle> for &Ref<'a, T>
Source§fn into(self) -> ObjectHandle
fn into(self) -> ObjectHandle
Converts this type into the (usually inferred) input type.
Source§impl<'a, T> Into<ObjectHandle> for Ref<'a, T>
impl<'a, T> Into<ObjectHandle> for Ref<'a, T>
Source§fn into(self) -> ObjectHandle
fn into(self) -> ObjectHandle
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl<'obj, T> !Freeze for Ref<'obj, T>
impl<'obj, T> !ObjSafe for Ref<'obj, T>
impl<'obj, T> !RefUnwindSafe for Ref<'obj, T>
impl<'obj, T> !Send for Ref<'obj, T>
impl<'obj, T> StoreCopy for Ref<'obj, T>where
T: StoreCopy,
impl<'obj, T> !Sync for Ref<'obj, T>
impl<'obj, T> Unpin for Ref<'obj, T>
impl<'obj, T> UnwindSafe for Ref<'obj, T>where
T: RefUnwindSafe,
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