mirror of
https://github.com/fluencelabs/interface-types
synced 2024-12-04 15:20:20 +00:00
add Eq, Hash for types; bump version
This commit is contained in:
parent
e61b645899
commit
2a756bd485
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -195,7 +195,7 @@ checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce"
|
||||
|
||||
[[package]]
|
||||
name = "wasmer-interface-types-fl"
|
||||
version = "0.17.3"
|
||||
version = "0.17.4"
|
||||
dependencies = [
|
||||
"log",
|
||||
"nom",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "wasmer-interface-types-fl"
|
||||
version = "0.17.3"
|
||||
version = "0.17.4"
|
||||
description = "WebAssembly Interface Types library for Wasmer"
|
||||
license = "MIT"
|
||||
authors = ["The Wasmer Engineering Team <engineering@wasmer.io>"]
|
||||
|
@ -4,7 +4,7 @@ use crate::vec1::Vec1;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Represents the types supported by WIT.
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize)]
|
||||
pub enum InterfaceType {
|
||||
/// A 8-bits signed integer.
|
||||
S8,
|
||||
@ -57,7 +57,7 @@ pub enum InterfaceType {
|
||||
}
|
||||
|
||||
/// Represents a record field type.
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize)]
|
||||
pub struct RecordFieldType {
|
||||
// TODO: make name optional to support structures with anonymous fields in Rust
|
||||
/// A field name.
|
||||
@ -68,7 +68,7 @@ pub struct RecordFieldType {
|
||||
}
|
||||
|
||||
/// Represents a record type.
|
||||
#[derive(PartialEq, Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize)]
|
||||
pub struct RecordType {
|
||||
/// A record name.
|
||||
pub name: String,
|
||||
|
@ -9,7 +9,7 @@ use std::{
|
||||
|
||||
/// `Vec1<T>` represents a non-empty `Vec<T>`. It derefs to `Vec<T>`
|
||||
/// directly.
|
||||
#[derive(Clone, PartialEq, Serialize, Deserialize, Default)]
|
||||
#[derive(Clone, PartialEq, Eq, Serialize, Hash, Deserialize, Default)]
|
||||
pub struct Vec1<T>(Vec<T>)
|
||||
where
|
||||
T: Debug;
|
||||
|
Loading…
Reference in New Issue
Block a user