[][src]Struct fixparser::FixMessage

pub struct FixMessage { /* fields omitted */ }

This is the interface you interact with.

The internal message is represented as follows:

This example is not tested
FixMessage    := FixComponent
FixComponent  := FixEntity*

FixEntity     := Field | Group

Field         := (tag: i32, value: String)
Group         := FixComponent*

Implementations

impl FixMessage[src]

pub fn from_tag_value(input_message: &str) -> Option<FixMessage>[src]

Creates a FixMessage from an input string encoded in FIX Tag=Value (classic FIX).

Examples

let input = "Recv | 8=FIX.4.4 | 555=2 | 600=CGY | 604=2 | 605=F7 | 605=CGYU0 | 600=CGY | 10=209";
println!("{}", fixparser::FixMessage::from_tag_value(&input).unwrap().to_json());

pub fn to_json(&self) -> Value[src]

Get a representation of the message in json string format.

Examples

// this input has the non-printable character 0x01 as the separator of the fields
let input = "8=FIX.4.4555=2600=CGY604=2605=F7605=CGYU0600=CGY10=209";
println!("{}", fixparser::FixMessage::from_tag_value(&input).unwrap().to_json());
This example is not tested
{"8":"FIX.4.4","555":[{"600":"CGY","604":[{"605":"F7"},{"605":"CGYU0"}]},{"600":"CGY"}],"10":"209"}

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.