mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-05-29 07:31:54 +00:00
Merge pull request #231 from alexcrichton/hash
Enable using `Type` in a `HashMap`
This commit is contained in:
commit
6e43ba42e5
@ -7,7 +7,7 @@ use super::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Type definition in types section. Currently can be only of the function type.
|
/// Type definition in types section. Currently can be only of the function type.
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq, Hash, Eq)]
|
||||||
pub enum Type {
|
pub enum Type {
|
||||||
/// Function type.
|
/// Function type.
|
||||||
Function(FunctionType),
|
Function(FunctionType),
|
||||||
@ -32,7 +32,7 @@ impl Serialize for Type {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Value type.
|
/// Value type.
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
#[derive(Clone, Copy, Debug, PartialEq, Hash, Eq)]
|
||||||
pub enum ValueType {
|
pub enum ValueType {
|
||||||
/// 32-bit signed integer
|
/// 32-bit signed integer
|
||||||
I32,
|
I32,
|
||||||
@ -136,7 +136,7 @@ impl Serialize for BlockType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Function signature type.
|
/// Function signature type.
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq, Hash, Eq)]
|
||||||
pub struct FunctionType {
|
pub struct FunctionType {
|
||||||
form: u8,
|
form: u8,
|
||||||
params: Vec<ValueType>,
|
params: Vec<ValueType>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user