Also, the IDE auto-formatted the length of several other comments.
This commit is contained in:
Andrew Brown
2021-07-07 10:29:51 -07:00
parent c71ad9490e
commit 43b9337162

View File

@@ -38,7 +38,7 @@ pub mod wasmtime_crate {
pub use wasmtime::*; pub use wasmtime::*;
} }
/// A trait which abstracts how to get at the region of host memory taht /// A trait which abstracts how to get at the region of host memory that
/// contains guest memory. /// contains guest memory.
/// ///
/// All `GuestPtr` types will contain a handle to this trait, signifying where /// All `GuestPtr` types will contain a handle to this trait, signifying where
@@ -70,11 +70,11 @@ pub mod wasmtime_crate {
/// `GuestPtr` to safely read and write interior data. /// `GuestPtr` to safely read and write interior data.
/// ///
/// This type also provides methods for run-time borrow checking of references /// This type also provides methods for run-time borrow checking of references
/// into the memory. The safety of this mechanism depends on there being /// into the memory. The safety of this mechanism depends on there being exactly
/// exactly one associated tracking of borrows for a given WebAssembly memory. /// one associated tracking of borrows for a given WebAssembly memory. There
/// There must be no other reads or writes of WebAssembly the memory by either /// must be no other reads or writes of WebAssembly the memory by either Rust or
/// Rust or WebAssembly code while there are any outstanding borrows, as given /// WebAssembly code while there are any outstanding borrows, as given by
/// by `GuestMemory::has_outstanding_borrows()`. /// `GuestMemory::has_outstanding_borrows()`.
/// ///
/// # Using References /// # Using References
/// ///
@@ -85,11 +85,11 @@ pub mod wasmtime_crate {
/// ///
/// These smart pointers are dynamically borrow-checked by the borrow checker /// These smart pointers are dynamically borrow-checked by the borrow checker
/// methods on this trait. While a `GuestSlice` or a `GuestStr` are live, the /// methods on this trait. While a `GuestSlice` or a `GuestStr` are live, the
/// [`GuestMemory::has_outstanding_borrows()`] method will always return /// [`GuestMemory::has_outstanding_borrows()`] method will always return `true`.
/// `true`. If you need to re-enter the guest or otherwise read or write to /// If you need to re-enter the guest or otherwise read or write to the contents
/// the contents of a WebAssembly memory, all `GuestSlice`s and `GuestStr`s /// of a WebAssembly memory, all `GuestSlice`s and `GuestStr`s for the memory
/// for the memory must be dropped, at which point /// must be dropped, at which point `GuestMemory::has_outstanding_borrows()`
/// `GuestMemory::has_outstanding_borrows()` will return `false`. /// will return `false`.
pub unsafe trait GuestMemory: Send + Sync { pub unsafe trait GuestMemory: Send + Sync {
/// Returns the base allocation of this guest memory, located in host /// Returns the base allocation of this guest memory, located in host
/// memory. /// memory.