Struct fefix::tagvalue::RawFrame[][src]

pub struct RawFrame<T> {
    pub data: T,
    pub begin_string: Range<usize>,
    pub payload: Range<usize>,
}
Expand description

An immutable view over the contents of a FIX message by a RawDecoder.

Fields

data: Tbegin_string: Range<usize>payload: Range<usize>

Implementations

Returns an immutable reference to the raw contents of self.

Examples
use fefix::tagvalue::{Config, RawDecoder};
use fefix::prelude::*;

let mut decoder = RawDecoder::<Config>::new();
decoder.config_mut().set_separator(b'|');
let data = b"8=FIX.4.2|9=42|35=0|49=A|56=B|34=12|52=20100304-07:59:30|10=022|";
let message = decoder.decode(data).unwrap();

assert_eq!(message.as_bytes(), data);

Returns an immutable reference to the BeginString <8> field value of self.

Examples
use fefix::tagvalue::{Config, RawDecoder};
use fefix::prelude::*;

let mut decoder = RawDecoder::<Config>::new();
decoder.config_mut().set_separator(b'|');
let data = b"8=FIX.4.2|9=42|35=0|49=A|56=B|34=12|52=20100304-07:59:30|10=022|";
let message = decoder.decode(data).unwrap();

assert_eq!(message.begin_string(), b"FIX.4.2");

Returns an immutable reference to the payload of self. In this context, “payload” means all fields besides

  • BeginString <8>;
  • BodyLength <9>;
  • CheckSum <10>.

According to this definition, the payload may also contain fields that are technically part of StandardHeader and StandardTrailer, i.e. payload and body and not synonyms.

use fefix::tagvalue::{Config, RawDecoder};
use fefix::prelude::*;

let mut decoder = RawDecoder::<Config>::new();
decoder.config_mut().set_separator(b'|');
let data = b"8=FIX.4.2|9=42|35=0|49=A|56=B|34=12|52=20100304-07:59:30|10=022|";
let message = decoder.decode(data).unwrap();

assert_eq!(message.payload().len(), 42);

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.