pub struct DataDictionary {
pub begin_string: String,
pub fields_by_tag: HashMap<Tag, FieldDef>,
pub tags_by_name: HashMap<String, Tag>,
pub header_tags: HashSet<Tag>,
pub header_required: Vec<Tag>,
pub trailer_tags: HashSet<Tag>,
pub trailer_required: Vec<Tag>,
pub messages: HashMap<String, MessageDef>,
}Fields§
§begin_string: String§fields_by_tag: HashMap<Tag, FieldDef>§header_required: Vec<Tag>§trailer_required: Vec<Tag>§messages: HashMap<String, MessageDef>Implementations§
Source§impl DataDictionary
impl DataDictionary
pub fn parse(text: &str) -> Result<Self>
pub async fn load(path: impl AsRef<Path>) -> Result<Self>
Sourcepub fn merged_with_app(self, app: &DataDictionary) -> DataDictionary
pub fn merged_with_app(self, app: &DataDictionary) -> DataDictionary
Combine a FIXT transport dictionary (header/trailer/admin messages) with an application dictionary (app messages and fields) into one effective dictionary for validation.
Sourcepub fn canonicalize_body(&self, msg: &mut Message)
pub fn canonicalize_body(&self, msg: &mut Message)
Reorder a message body into the canonical form the reference engines produce: top-level fields ascending by tag, with each repeating-group block kept intact (in received/insertion order) under its counter tag.
Sourcepub fn group_template(
&self,
msg_type: &str,
counter: Tag,
) -> Option<GroupTemplate>
pub fn group_template( &self, msg_type: &str, counter: Tag, ) -> Option<GroupTemplate>
A ready-made GroupTemplate for reading a repeating group of this
message type (top-level groups only).
Sourcepub fn validate(
&self,
msg: &Message,
settings: &ValidationSettings,
) -> Result<(), RejectError>
pub fn validate( &self, msg: &Message, settings: &ValidationSettings, ) -> Result<(), RejectError>
Validate a parsed message. Returns the reject that should be sent when it fails.
Trait Implementations§
Source§impl Clone for DataDictionary
impl Clone for DataDictionary
Source§fn clone(&self) -> DataDictionary
fn clone(&self) -> DataDictionary
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataDictionary
impl Debug for DataDictionary
Source§impl Default for DataDictionary
impl Default for DataDictionary
Source§fn default() -> DataDictionary
fn default() -> DataDictionary
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DataDictionary
impl RefUnwindSafe for DataDictionary
impl Send for DataDictionary
impl Sync for DataDictionary
impl Unpin for DataDictionary
impl UnsafeUnpin for DataDictionary
impl UnwindSafe for DataDictionary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more