nautilus_serialization/sbe/mod.rs
1// -------------------------------------------------------------------------------------------------
2// Copyright (C) 2015-2026 Nautech Systems Pty Ltd. All rights reserved.
3// https://nautechsystems.io
4//
5// Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6// You may not use this file except in compliance with the License.
7// You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16//! Generic SBE (Simple Binary Encoding) codec utilities.
17//!
18//! This module provides:
19//! - [`SbeCursor`]: Zero-copy byte cursor with typed little-endian readers.
20//! - [`SbeWriter`]: Pre-sized byte writer with typed little-endian writers.
21//! - [`SbeEncodeError`] and [`SbeDecodeError`]: Common SBE codec errors.
22//! - [`market`]: Hand-written Nautilus market-data SBE codecs.
23//! - [`GroupSizeEncoding`] and [`GroupSize16Encoding`]: Group header decoders.
24//! - [`decode_var_string8`]: varString8 decoder helper.
25
26pub mod cursor;
27pub mod error;
28pub mod market;
29pub mod primitives;
30pub mod writer;
31
32pub use cursor::SbeCursor;
33pub use error::{MAX_GROUP_SIZE, SbeDecodeError, SbeEncodeError};
34pub use market::{DataAny, FromSbe, FromSbeReuse, ToSbe};
35pub use primitives::{GroupSize16Encoding, GroupSizeEncoding, decode_var_string8};
36pub use writer::SbeWriter;