Struct wiggle_borrow::BorrowChecker [−][src]
pub struct BorrowChecker { /* fields omitted */ }
Implementations
impl BorrowChecker
[src]
impl BorrowChecker
[src]pub fn new() -> Self
[src]
pub 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
does not access memory with an outstanding mutable borrow, and
GuestPtr::write
does not access memory with an outstanding
shared or mutable borrow.
pub fn has_outstanding_borrows(&self) -> bool
[src]
pub fn has_outstanding_borrows(&self) -> bool
[src]Indicates whether any outstanding shared or mutable 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.
pub fn shared_borrow(&self, r: Region) -> Result<BorrowHandle, GuestError>
[src]
pub fn mut_borrow(&self, r: Region) -> Result<BorrowHandle, GuestError>
[src]
pub fn shared_unborrow(&self, h: BorrowHandle)
[src]
pub fn mut_unborrow(&self, h: BorrowHandle)
[src]
pub fn is_shared_borrowed(&self, r: Region) -> bool
[src]
pub fn is_mut_borrowed(&self, r: Region) -> bool
[src]
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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]