Refactor api code and doc

This commit is contained in:
Steve Akinyemi
2018-11-20 20:11:58 +01:00
parent 70e3262bf8
commit 771dae7feb
32 changed files with 796 additions and 2332 deletions

View File

@ -65,6 +65,11 @@ impl LinearMemory {
self.current
}
/// Returns the maximum number of wasm pages allowed.
pub fn maximum_size(&self) -> u32 {
self.maximum.unwrap_or(65536)
}
/// Grow memory by the specified amount of pages.
///
/// Returns `None` if memory can't be grown by the specified amount