quickfix-tokio 0.1.0

A pure-Rust FIX protocol engine built natively on tokio
Documentation
//! # quickfix-tokio
//!
//! A pure-Rust FIX protocol engine built natively on tokio — no C++
//! bindings, no blocking threads. Protocol behavior follows the reference
//! QuickFIX engines (C++, Go, .NET); the concurrency model is one tokio
//! task per session that owns all session state, with sockets and API
//! handles connected purely by channels.
//!
//! The engine is written entirely in safe Rust (`#![forbid(unsafe_code)]`).
//!
//! ```no_run
//! use std::sync::Arc;
//! use quickfix_tokio::{Application, Engine, Settings, MemoryStoreFactory, TracingLogFactory};
//!
//! struct MyApp;
//! impl Application for MyApp {}
//!
//! # async fn run() -> quickfix_tokio::Result<()> {
//! let settings = Settings::from_file("fix.cfg").await?;
//! let engine = Engine::start(
//!     &settings,
//!     Arc::new(MyApp),
//!     Arc::new(MemoryStoreFactory::new()),
//!     Arc::new(TracingLogFactory),
//! ).await?;
//! # Ok(())
//! # }
//! ```
#![forbid(unsafe_code)]

pub mod application;
pub mod datadictionary;
pub mod engine;
#[cfg(feature = "fix44")]
pub mod fix44;
pub mod error;
pub mod field_map;
pub mod log;
pub mod message;
pub mod parser;
pub mod schedule;
pub mod session;
pub mod session_id;
pub mod settings;
pub mod store;
pub mod tags;
#[cfg(feature = "tls")]
mod tls;
mod transport;
pub mod value;

pub use application::{
    Application, ApplicationError, ChannelApplication, DoNotSend, SessionEvent, event_channel,
};
pub use datadictionary::{DataDictionary, ValidationSettings};
pub use engine::Engine;
pub use error::{Error, RejectError, Result, SessionRejectReason};
pub use field_map::{FieldMap, GroupTemplate};
pub use log::{FileLogFactory, Log, LogFactory, NullLogFactory, Rotation, TracingLogFactory};
pub use message::{Message, Tag};
pub use session::{SessionHandle, SessionStatus};
pub use session_id::SessionId;
pub use settings::{ConnectionType, SessionConfig, Settings, TlsSettings};
pub use store::{
    FileStoreFactory, MemoryStoreFactory, MessageStore, MessageStoreFactory,
};
pub use value::{FixDate, TimestampPrecision, UtcTimestamp};

/// The numeric type for FIX float-family fields (Price, Qty, Amt, Float,
/// Percentage). Exact fixed-point [`rust_decimal::Decimal`] with the
/// `decimal` feature (default), or `f64` without it. Generated typed
/// accessors use this alias, so the whole typed API switches with the
/// feature.
#[cfg(feature = "decimal")]
pub type Amount = rust_decimal::Decimal;
#[cfg(not(feature = "decimal"))]
pub type Amount = f64;

#[cfg(feature = "decimal")]
pub use rust_decimal::{Decimal, dec};