Skip to main content

refix_message/
dialect.rs

1use crate::Tag;
2
3/// How a counterparty's FIX differs from the standard.
4#[derive(Clone, Copy, Debug, Default)]
5pub struct Dialect<'a> {
6    pub(crate) extra_length_tags: &'a [Tag],
7}
8
9impl<'a> Dialect<'a> {
10    /// Standard FIX.
11    pub const fn new() -> Self {
12        Self {
13            extra_length_tags: &[],
14        }
15    }
16
17    /// Length tags beyond the standard set, each giving the byte count of the
18    /// data field after it.
19    pub const fn with_extra_length_tags(self, tags: &'a [Tag]) -> Self {
20        Self {
21            extra_length_tags: tags,
22        }
23    }
24}