Struct fefix::tagvalue::Message[][src]

pub struct Message<'a, T> { /* fields omitted */ }
Expand description

A FIX message returned by Decoder or DecoderBuffered.

Implementations

Returns an Iterator over all fields in self, in sequential order starting from the very first field.

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

const DATA: &[u8] = b"8=FIX.4.4|9=42|35=0|49=A|56=B|34=12|52=20100304-07:59:30|10=185|";

let mut decoder = Decoder::<Config>::new(Dictionary::fix44());
decoder.config_mut().set_separator(b'|');

let message = decoder.decode(DATA).unwrap();
let first_field = message.fields().next();

assert_eq!(first_field, Some((TagU16::new(8).unwrap(), b"FIX.4.4" as &[u8])));

Returns the underlying byte contents of self.

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

const DATA: &[u8] = b"8=FIX.4.4|9=42|35=0|49=A|56=B|34=12|52=20100304-07:59:30|10=185|";

let mut decoder = Decoder::<Config>::new(Dictionary::fix44());
decoder.config_mut().set_separator(b'|');

let message = decoder.decode(DATA).unwrap();
assert_eq!(message.as_bytes(), DATA);

Returns the number of FIX tags contained in self.

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

const DATA: &[u8] = b"8=FIX.4.4|9=42|35=0|49=A|56=B|34=12|52=20100304-07:59:30|10=185|";

let mut decoder = Decoder::<Config>::new(Dictionary::fix44());
decoder.config_mut().set_separator(b'|');

let message = decoder.decode(DATA).unwrap();
assert_eq!(message.len(), message.fields().count());

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Queries self for a group tagged with key which may or may not be present in self. This differs from FieldAccess::group() as missing groups result in None rather than Err. Read more

Queries self for field and returns its raw contents.

Queries self for a group tagged with key. An unsuccessful query results in [Err(None)]. Read more

Queries self for field and deserializes it.

Like FieldAccess::fv(), but with lossy deserialization.

Queries self for field and deserializes it. This differs from FieldAccess::fv() as missing fields result in None rather than Err. Read more

Like FieldAccess::fv_opt(), but with lossy deserialization.

Queries self for a group tagged with key which may or may not be present in self. This differs from FieldAccess::group() as missing groups result in None rather than Err. Read more

Queries self for field and returns its raw contents.

Queries self for a group tagged with key. An unsuccessful query results in [Err(None)]. Read more

Queries self for field and deserializes it.

Like FieldAccess::fv(), but with lossy deserialization.

Queries self for field and deserializes it. This differs from FieldAccess::fv() as missing fields result in None rather than Err. Read more

Like FieldAccess::fv_opt(), but with lossy deserialization.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize self into Serializer 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.