it_json_serde/lib.rs
1/*
2 * Copyright 2022 Fluence Labs Limited
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#![warn(rust_2018_idioms)]
17#![deny(
18 dead_code,
19 nonstandard_style,
20 unused_imports,
21 unused_mut,
22 unused_variables,
23 unused_unsafe,
24 unreachable_patterns
25)]
26mod ivalues_to_json;
27mod json_to_ivalues;
28mod errors;
29
30pub type JsonResult<T> = Result<T, ITJsonSeDeError>;
31pub use errors::ITJsonSeDeError;
32pub use ivalues_to_json::ivalues_to_json;
33pub use json_to_ivalues::json_to_ivalues;
34
35use std::collections::HashMap;
36use std::sync::Arc;
37
38pub(crate) use wasmer_it::IValue;
39pub(crate) use wasmer_it::IType;
40pub(crate) use wasmer_it::IRecordType;
41pub(crate) type MRecordTypes = HashMap<u64, Arc<IRecordType>>;