mirror of
https://github.com/fluencelabs/interface-types
synced 2025-06-22 19:21:39 +00:00
feat(interface-types) Introduce RecordType
for InterfaceType
and Type
.
The `Type::Record` variant now is defined by `RecordType`. In addition, `InterfaceType` has a new variant: `Record`, that is also defined by `RecordType`. Encoders and decoders are updated to consider `RecordType`, which removes code duplication and simplify code.
This commit is contained in:
@ -15,9 +15,9 @@ fn test_binary_encoding_decoding_roundtrip() {
|
||||
inputs: vec![InterfaceType::I32, InterfaceType::I32],
|
||||
outputs: vec![InterfaceType::S32],
|
||||
},
|
||||
Type::Record {
|
||||
Type::Record(RecordType {
|
||||
fields: vec![InterfaceType::String, InterfaceType::I32],
|
||||
},
|
||||
}),
|
||||
],
|
||||
imports: vec![Import {
|
||||
namespace: "a",
|
||||
|
Reference in New Issue
Block a user