[−][src]Struct wiggle::BorrowChecker
Implementations
impl BorrowChecker
[src]
pub unsafe fn new() -> Self
[src]
A BorrowChecker
manages run-time validation of borrows from a GuestMemory
. It keeps
track of regions of guest memory which are possible to alias with Rust references (via the
GuestSlice
and GuestStr
structs, which implement std::ops::Deref
and
std::ops::DerefMut
. It also enforces that GuestPtr::read
and GuestPtr::write
do not
access memory with an outstanding borrow.
The safety of this mechanism depends on creating exactly one BorrowChecker
per
WebAssembly memory. There must be no other reads or writes of WebAssembly the memory by
either Rust or WebAssembly code while there are any outstanding borrows, as given by
BorrowChecker::has_outstanding_borrows()
.
pub fn has_outstanding_borrows(&self) -> bool
[src]
Indicates whether any outstanding borrows are known to the BorrowChecker
. This function
must be false
in order for it to be safe to recursively call into a WebAssembly module,
or to manipulate the WebAssembly memory by any other means.
Auto Trait Implementations
impl !RefUnwindSafe for BorrowChecker
impl Send for BorrowChecker
impl !Sync for BorrowChecker
impl Unpin for BorrowChecker
impl UnwindSafe for BorrowChecker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointee for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,