Improve the wording of typed index doc comments.

This commit is contained in:
Mark McCaskey
2019-12-17 19:10:36 -05:00
parent d165a85743
commit 13b097e8c3

View File

@ -182,13 +182,17 @@ pub struct ImportName {
/// [`TableDescriptor`]s. /// [`TableDescriptor`]s.
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)] #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq)]
pub enum ExportIndex { pub enum ExportIndex {
/// Function export index. Used to map to things relating to Wasm functions. /// Function export index. [`FuncIndex`] is a type-safe handle referring to
/// a Wasm function.
Func(FuncIndex), Func(FuncIndex),
/// Memory export index. Used to map to things relating to Wasm memories. /// Memory export index. [`MemoryIndex`] is a type-safe handle referring to
/// a Wasm memory.
Memory(MemoryIndex), Memory(MemoryIndex),
/// Global export index. Used to map to things relating to Wasm globals. /// Global export index. [`GlobalIndex`] is a type-safe handle referring to
/// a Wasm global.
Global(GlobalIndex), Global(GlobalIndex),
/// Table export index. Used to map to things relating to Wasm tables. /// Table export index. [`TableIndex`] is a type-safe handle referring to
/// to a Wasm table.
Table(TableIndex), Table(TableIndex),
} }
@ -296,7 +300,7 @@ impl<K: TypedIndex> StringTable<K> {
} }
} }
/// A type-safe way to get namespaces from a [`StringTable`]. /// A type-safe handle referring to a module namespace.
#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct NamespaceIndex(u32); pub struct NamespaceIndex(u32);
@ -312,7 +316,7 @@ impl TypedIndex for NamespaceIndex {
} }
} }
/// A type-safe way to get names from a [`StringTable`]. /// A type-safe handle referring to a name in a module namespace.
#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq, Hash)] #[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct NameIndex(u32); pub struct NameIndex(u32);