Skip to main content

nautilus_event_store/capture/
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//! Bus capture adapter: the seam that converts dispatched bus messages into event store
17//! entries.
18//!
19//! See `README.md` "Capture surface" and "Architecture" for the SPEC contract; the
20//! [`BusCaptureAdapter`] implements the dispatch-boundary side of that contract by
21//! consulting an [`EncoderRegistry`] allow-list and forwarding encoded entries to the
22//! [`crate::EventStoreWriter`].
23
24pub mod adapter;
25pub mod builtins;
26pub mod encoder;
27pub mod registry;
28
29pub use adapter::{BusCaptureAdapter, CaptureError};
30pub use builtins::{
31    PAYLOAD_TYPE_ACCOUNT_STATE, PAYLOAD_TYPE_FILL_REPORT, PAYLOAD_TYPE_ORDER_FILLED,
32    PAYLOAD_TYPE_ORDER_STATUS_REPORT, PAYLOAD_TYPE_POSITION_STATUS_REPORT,
33    PAYLOAD_TYPE_SUBMIT_ORDER, default_registry, encode_account_state, encode_fill_report,
34    encode_order_filled, encode_order_status_report, encode_position_status_report,
35    encode_submit_order, register_default,
36};
37pub use encoder::{Encode, EncodeError, EncodedPayload, TypedEncoder};
38pub use registry::{EncoderRegistry, HeadersExtractor, TypedHeadersExtractor};