Update documentation for ExternalVariableValue.

This commit is contained in:
Sergey Pepyakin 2017-11-27 20:39:27 +03:00
parent e99779c9df
commit e6bf41a10c

View File

@ -23,7 +23,13 @@ pub enum VariableType {
pub trait ExternalVariableValue {
/// Get variable value.
fn get(&self) -> RuntimeValue;
/// Set variable value.
///
/// WebAssembly specificaiton [requires][0] that if global variable is immutable, then
/// it should remain unchanged.
///
/// [0]: https://webassembly.github.io/spec/appendix/properties.html#global-instance
fn set(&mut self, value: RuntimeValue) -> Result<(), Error>;
}