1#![deny(
25 non_upper_case_globals,
26 non_camel_case_types,
27 non_snake_case,
28 unused_mut,
29 unused_imports,
30 )]
33#![cfg_attr(docsrs, feature(doc_auto_cfg))]
34
35#[cfg(feature = "derive")]
36pub use derive::{StrictDecode, StrictDumb, StrictEncode, StrictType};
37#[cfg(not(feature = "derive"))]
38use derive::{StrictDecode, StrictDumb, StrictEncode, StrictType};
39#[cfg(feature = "derive")]
40pub use strict_encoding_derive as derive;
41#[cfg(not(feature = "derive"))]
42use strict_encoding_derive as derive;
43
44#[macro_use]
45extern crate amplify;
46#[cfg(feature = "serde")]
47#[macro_use]
48extern crate serde;
49
50#[macro_use]
51mod macros;
52mod types;
53mod traits;
54#[macro_use]
55mod ident;
56mod error;
57mod reader;
58mod writer;
59mod util;
60mod primitives;
61mod embedded;
62pub mod stl;
63#[cfg(test)]
64pub(crate) mod test;
65
66pub use embedded::{Byte, DecodeRawLe};
67pub use error::{DecodeError, DeserializeError, SerializeError};
68pub use ident::{FieldName, Ident, LibName, TypeName, VariantName, IDENT_MAX_LEN};
69pub use primitives::{NumCls, NumInfo, NumSize, Primitive};
70pub use reader::{ConfinedReader, StreamReader, StrictReader};
71pub use stl::{Bool, InvalidRString, RString, RestrictedCharSet, U1, U2, U3, U4, U5, U6, U7};
72pub use traits::*;
73pub use types::*;
74pub use util::{Sizing, Variant};
75pub use writer::{
76 SplitParent, StreamWriter, StrictParent, StrictWriter, StructWriter, UnionWriter,
77};
78
79#[deprecated(since = "2.2.0", note = "use LIB_EMBEDDED")]
80pub const NO_LIB: &str = LIB_EMBEDDED;
81#[deprecated(since = "2.2.0", note = "use LIB_NAME_STD")]
82pub const STD_LIB: &str = "StdLib";
83pub const LIB_EMBEDDED: &str = "_";
84pub const LIB_NAME_STD: &str = "Std";
85pub const STRICT_TYPES_LIB: &str = "StrictTypes";