[][src]Struct wiggle::BorrowChecker

pub struct BorrowChecker { /* fields omitted */ }

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointee for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.