mirror of
https://github.com/fluencelabs/interface-types
synced 2025-06-22 11:11:38 +00:00
add VariantCount for IType and Value (#12)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "fluence-it-types"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
description = "Definitions of IValue and IType"
|
||||
authors = ["Fluence Labs"]
|
||||
edition = "2018"
|
||||
@ -18,5 +18,7 @@ serde = { version = "1.0.118", features = ["derive", "rc"]}
|
||||
nom = { version = "5.1", optional = true }
|
||||
wast = { version = "8.0", optional = true }
|
||||
|
||||
variant_count = "1.1"
|
||||
|
||||
[features]
|
||||
impls = ["nom", "wast"]
|
||||
|
@ -4,9 +4,9 @@ use crate::ne_vec::NEVec;
|
||||
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
|
||||
use variant_count::VariantCount;
|
||||
/// Represents the types supported by WIT.
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize)]
|
||||
#[derive(PartialEq, Eq, Debug, Clone, Hash, Serialize, Deserialize, VariantCount)]
|
||||
pub enum IType {
|
||||
/// Boolean.
|
||||
Boolean,
|
||||
|
@ -2,8 +2,10 @@
|
||||
|
||||
use crate::ne_vec::NEVec;
|
||||
|
||||
use variant_count::VariantCount;
|
||||
|
||||
/// A WIT value.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[derive(Debug, Clone, PartialEq, VariantCount)]
|
||||
pub enum IValue {
|
||||
/// Boolean value.
|
||||
Boolean(bool),
|
||||
|
Reference in New Issue
Block a user