From d1e70978db11912f64c321e6a2bc3cd9c9794ea8 Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Fri, 26 Jan 2018 18:25:13 +0300 Subject: [PATCH] Document descriptors. --- src/types.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/types.rs b/src/types.rs index f0c63a3..419a67c 100644 --- a/src/types.rs +++ b/src/types.rs @@ -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, @@ -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,