Skip to main content

RawMessage

Struct RawMessage 

Source
pub struct RawMessage { /* private fields */ }
Expand description

Raw bytes of a FIX message and an index of every field in wire order.

Implementations§

Source§

impl RawMessage

Source

pub fn get_group( &self, table: &impl GroupLayout, known: &KnownTags<'_>, ) -> Result<Option<Group<'_>>, InvalidValue>

The group table describes, read from the whole frame.

Source§

impl RawMessage

Source

pub fn bytes(&self) -> &Bytes

The whole frame, from 8= to the SOH after CheckSum.

Source

pub fn scope(&self) -> Scope<'_>

The whole frame as a Scope.

Source

pub fn scope_between(&self, start: Slot, end: Slot) -> Option<Scope<'_>>

The scope over the fields from start up to end, or None if they don’t fit this message.

Source

pub fn get(&self, tag: Tag) -> Option<&[u8]>

Value of the first occurrence of tag, scanning from the start.

Source

pub fn get_str(&self, tag: Tag) -> Result<Option<&str>, InvalidValue>

First occurrence of tag as UTF-8 text or Ok(None) when absent.

Source

pub fn get_int(&self, tag: Tag) -> Result<Option<i64>, InvalidValue>

First occurrence of tag parsed as an integer or Ok(None) when absent.

Source

pub fn get_decimal(&self, tag: Tag) -> Result<Option<Decimal>, InvalidValue>

First occurrence of tag parsed as a decimal or Ok(None) when absent.

Source

pub fn entries(&self) -> impl Iterator<Item = (Tag, &[u8])>

Every field as (tag, value), in wire order, duplicates included.

Includes an entry with Tag::MALFORMED for any byte run that could not be tokenised, so the entries cover the whole frame.

Source§

impl RawMessage

Source

pub fn get_multiple_values<T>( &self, tag: Tag, ) -> Result<Option<MultipleValues<'_, T>>, InvalidValue>

The values of a multiple-value field, read from the whole frame.

Trait Implementations§

Source§

impl Clone for RawMessage

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RawMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.