We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CodeMemory::text_mut
1 parent 57a109e commit 2e00ca6Copy full SHA for 2e00ca6
crates/wasmtime/src/runtime/code_memory.rs
@@ -470,7 +470,14 @@ impl CodeMemory {
470
}
471
472
473
- /// Temporarily edit the code with the given closure.
+ /// Return a mutable borrow to the code, suitable for editing.
474
+ ///
475
+ /// Must not be published.
476
477
+ /// # Panics
478
479
+ /// This method panics if the code has been published (and not
480
+ /// subsequently unpublished).
481
pub fn text_mut(&mut self) -> &mut [u8] {
482
assert!(!self.published);
483
// SAFETY: we assert !published, which means we either have
0 commit comments