Skip to main content

midnight_serialize/
lib.rs

1// This file is part of midnight-ledger.
2// Copyright (C) Midnight Foundation
3// SPDX-License-Identifier: Apache-2.0
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// http://www.apache.org/licenses/LICENSE-2.0
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
13
14#![deny(unreachable_pub)]
15#![deny(warnings)]
16// Proptest derive triggers this.
17#![allow(non_local_definitions)]
18
19mod deserializable;
20mod serializable;
21mod shape;
22mod tagged;
23mod util;
24
25pub use crate::deserializable::{
26    Deserializable, RECURSION_LIMIT, peek_tag, tagged_deserialize, tagged_deserialize_sequence,
27};
28pub use crate::serializable::{GLOBAL_TAG, Serializable, tagged_serialize, tagged_serialized_size};
29#[cfg(feature = "proptest")]
30pub use crate::shape::check_encoding_shape;
31pub use crate::shape::{EncodingShape, ScaleState, SeqState};
32pub use crate::tagged::Tagged;
33#[cfg(feature = "proptest")]
34pub use crate::util::{NoSearch, NoStrategy};
35pub use crate::util::{
36    ReadExt, ScaleBigInt, VecExt, gen_static_serialize_file, test_file_deserialize,
37};
38pub use macros::Serializable;