pub struct GuestBorrows { /* private fields */ }Implementations§
Source§impl GuestBorrows
impl GuestBorrows
pub fn new() -> Self
Sourcepub fn borrow_pointee<'a, T>(
&mut self,
p: &GuestPtr<'a, T>,
) -> Result<(), GuestError>where
T: GuestType<'a>,
pub fn borrow_pointee<'a, T>(
&mut self,
p: &GuestPtr<'a, T>,
) -> Result<(), GuestError>where
T: GuestType<'a>,
Borrow the region of memory pointed to by a GuestPtr. This is required for safety if
you are dereferencing GuestPtrs while holding a reference to a slice via
GuestPtr::as_raw.
Sourcepub fn borrow_slice<'a, T>(
&mut self,
p: &GuestPtr<'a, [T]>,
) -> Result<(), GuestError>where
T: GuestType<'a>,
pub fn borrow_slice<'a, T>(
&mut self,
p: &GuestPtr<'a, [T]>,
) -> Result<(), GuestError>where
T: GuestType<'a>,
Borrow the slice of memory pointed to by a GuestPtr<[T]>. This is required for safety if
you are dereferencing the GuestPtrs while holding a reference to another slice via
GuestPtr::as_raw. Not required if using GuestPtr::as_raw on this pointer.
Sourcepub fn borrow_str(&mut self, p: &GuestPtr<'_, str>) -> Result<(), GuestError>
pub fn borrow_str(&mut self, p: &GuestPtr<'_, str>) -> Result<(), GuestError>
Borrow the slice of memory pointed to by a GuestPtr<str>. This is required for safety if
you are dereferencing the GuestPtrs while holding a reference to another slice via
GuestPtr::as_raw. Not required if using GuestPtr::as_raw on this pointer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GuestBorrows
impl RefUnwindSafe for GuestBorrows
impl Send for GuestBorrows
impl Sync for GuestBorrows
impl Unpin for GuestBorrows
impl UnwindSafe for GuestBorrows
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