pub struct GuestPtr<T: ?Sized + Pointee> { /* private fields */ }Implementations§
Source§impl<T: ?Sized + Pointee> GuestPtr<T>
impl<T: ?Sized + Pointee> GuestPtr<T>
pub fn new(pointer: T::Pointer) -> Self
pub fn offset(&self) -> T::Pointer
Sourcepub fn cast<U>(&self) -> GuestPtr<U>
pub fn cast<U>(&self) -> GuestPtr<U>
Casts this GuestPtr type to a different type.
This is a safe method which is useful for simply reinterpreting the type
parameter on this GuestPtr. Note that this is a safe method, where
again there’s no guarantees about alignment, validity, in-bounds-ness,
etc of the returned pointer.
Trait Implementations§
impl<T: Copy + ?Sized + Pointee> Copy for GuestPtr<T>
impl<T: ?Sized + Pointee> StructuralPartialEq for GuestPtr<T>
Auto Trait Implementations§
impl<T> Freeze for GuestPtr<T>
impl<T> RefUnwindSafe for GuestPtr<T>
impl<T> Send for GuestPtr<T>
impl<T> Sync for GuestPtr<T>
impl<T> Unpin for GuestPtr<T>
impl<T> UnwindSafe for GuestPtr<T>
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