FixDeserialize

Trait FixDeserialize 

Source
pub trait FixDeserialize<'fix>: Sized {
    // Required methods
    fn deserialize_fields<F>(
        cur: &mut TagCursor<'fix>,
        is_a_parent_tag: F,
    ) -> Result<Self, FixError>
       where F: Fn(u32) -> bool;
    fn is_known_tag(tag: u32) -> bool;

    // Provided method
    fn from_fix(fix_message: &'fix [u8]) -> Result<Self, FixError> { ... }
}
Expand description

Trait for types that can be deserialized from FIX messages.

Prefer using #[derive(FixDeserialize)] (feature derive) to implement this.

Required Methods§

Source

fn deserialize_fields<F>( cur: &mut TagCursor<'fix>, is_a_parent_tag: F, ) -> Result<Self, FixError>
where F: Fn(u32) -> bool,

Parse fields from the tag cursor, deciding which tags belong to this type.

Source

fn is_known_tag(tag: u32) -> bool

Return whether a tag is known to this type.

Provided Methods§

Source

fn from_fix(fix_message: &'fix [u8]) -> Result<Self, FixError>

Decode a FIX message using the default SOH delimiter, with optional checksum validation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§