Document descriptors.

This commit is contained in:
Sergey Pepyakin 2018-01-26 18:25:13 +03:00
parent 39a10e9fc9
commit d1e70978db
1 changed files with 18 additions and 0 deletions

View File

@ -80,6 +80,12 @@ impl ValueType {
}
}
/// Description of a global variable.
///
/// Primarly used to describe imports of global variables.
/// See [`ImportResolver`] for details.
///
/// [`ImportResolver`]: trait.ImportResolver.html
pub struct GlobalDescriptor {
value_type: ValueType,
mutable: bool,
@ -102,6 +108,12 @@ impl GlobalDescriptor {
}
}
/// Description of a table.
///
/// Primarly used to describe imports of tables.
/// See [`ImportResolver`] for details.
///
/// [`ImportResolver`]: trait.ImportResolver.html
pub struct TableDescriptor {
initial: u32,
maximum: Option<u32>,
@ -124,6 +136,12 @@ impl TableDescriptor {
}
}
/// Description of a linear memory.
///
/// Primarly used to describe imports of linear memories.
/// See [`ImportResolver`] for details.
///
/// [`ImportResolver`]: trait.ImportResolver.html
pub struct MemoryDescriptor {
initial: u32,
maximum: Option<u32>,