mod config;
mod decoder;
mod encoder;
pub use config::Config;
pub use decoder::{
Decoder, FieldOrGroup, Message, MessageFieldsIter, MessageGroup,
};
pub use encoder::{Encoder, encoder_states};
#[derive(Copy, Clone, Debug, thiserror::Error)]
pub enum EncodeError {
#[error(
"Inconsistency between the FIX message and encoding rules as established by the dictionary."
)]
Dictionary,
}
#[derive(Copy, Clone, Debug, thiserror::Error)]
pub enum DecodeError {
#[error("Bad JSON syntax.")]
Syntax,
#[error("The message is valid JSON, but not a valid FIX message.")]
Schema,
#[error("Unrecognized message type.")]
InvalidMsgType,
#[error("The data does not conform to the specified message type.")]
InvalidData,
}