Struct easyfix_messages::deserializer::Deserializer

source ·
pub struct Deserializer<'de> { /* private fields */ }

Implementations§

source§

impl<'de> Deserializer<'de>

source

pub fn from_raw_message(raw_message: RawMessage<'_>) -> Deserializer<'_>

source

pub fn begin_string(&self) -> FixString

source

pub fn body_length(&self) -> Length

source

pub fn check_sum(&self) -> FixString

source

pub fn set_seq_num(&mut self, seq_num: SeqNum)

source

pub fn set_msg_type(&mut self, msg_type: MsgType)

source

pub fn reject( &mut self, tag: Option<TagNum>, reason: SessionRejectReason, ) -> DeserializeError

source

pub fn repeating_group_fields_out_of_order( &mut self, expected_tags: &[u16], processed_tags: &[u16], current_tag: u16, ) -> DeserializeError

source

pub fn put_tag(&mut self, tag: TagNum)

source

pub fn deserialize_msg_type(&mut self) -> Result<MsgType, DeserializeError>

Deserialize MsgType

source

pub fn deserialize_tag_num( &mut self, ) -> Result<Option<TagNum>, DeserializeError>

Deserialize sequence of character digits without commas or decimals. Value must be positive and may not contain leading zeros.

source

pub fn deserialize_int(&mut self) -> Result<Int, DeserializeError>

Deserialize sequence of character digits without commas or decimals and optional sign character (characters “-” and “0” – “9” ). The sign character utilizes one octet (i.e., positive int is “99999” while negative int is “-99999”).

Note that int values may contain leading zeros (e.g. “00023” = “23”).

source

pub fn deserialize_seq_num(&mut self) -> Result<SeqNum, DeserializeError>

Deserialize sequence of character digits without commas or decimals. Value must be positive.

source

pub fn deserialize_num_in_group( &mut self, ) -> Result<NumInGroup, DeserializeError>

Deserialize sequence of character digits without commas or decimals. Value must be positive.

source

pub fn deserialize_day_of_month( &mut self, ) -> Result<DayOfMonth, DeserializeError>

Deserialize sequence of character digits without commas or decimals (values 1 to 31).

source

pub fn deserialize_float(&mut self) -> Result<Float, DeserializeError>

Deserialize sequence of character digits with optional decimal point and sign character (characters “-”, “0” – “9” and “.”); the absence of the decimal point within the string will be interpreted as the float representation of an integer value. Note that float values may contain leading zeros (e.g. “00023.23” = “23.23”) and may contain or omit trailing zeros after the decimal point (e.g. “23.0” = “23.0000” = “23” = “23.”).

All float fields must accommodate up to fifteen significant digits. The number of decimal places used should be a factor of business/market needs and mutual agreement between counterparties.

source

pub fn deserialize_qty(&mut self) -> Result<Qty, DeserializeError>

source

pub fn deserialize_price(&mut self) -> Result<Price, DeserializeError>

source

pub fn deserialize_price_offset( &mut self, ) -> Result<PriceOffset, DeserializeError>

source

pub fn deserialize_amt(&mut self) -> Result<Amt, DeserializeError>

source

pub fn deserialize_percentage(&mut self) -> Result<Percentage, DeserializeError>

source

pub fn deserialize_boolean(&mut self) -> Result<Boolean, DeserializeError>

source

pub fn deserialize_char(&mut self) -> Result<Char, DeserializeError>

Deserialize any ASCII character except control characters.

source

pub fn deserialize_multiple_char_value( &mut self, ) -> Result<MultipleCharValue, DeserializeError>

Deserialize string containing one or more space-delimited single character values, e.g. “2 A F”.

source

pub fn deserialize_str(&mut self) -> Result<&FixStr, DeserializeError>

Deserialize alphanumeric free-format strings can include any character except control characters.

source

pub fn deserialize_string(&mut self) -> Result<FixString, DeserializeError>

Deserialize alphanumeric free-format strings can include any character except control characters.

source

pub fn deserialize_multiple_string_value( &mut self, ) -> Result<MultipleStringValue, DeserializeError>

Deserialize string containing one or more space-delimited multiple character values, e.g. “AV AN A”.

source

pub fn deserialize_country(&mut self) -> Result<Country, DeserializeError>

Deserialize ISO 3166-1:2013 Codes for the representation of names of countries and their subdivision (2-character code).

source

pub fn deserialize_currency(&mut self) -> Result<Currency, DeserializeError>

Deserialize ISO 4217:2015 Codes for the representation of currencies and funds (3-character code).

source

pub fn deserialize_exchange(&mut self) -> Result<Exchange, DeserializeError>

Deserialize ISO 10383:2012 Securities and related financial instruments – Codes for exchanges and market identification (MIC) (4-character code).

source

pub fn deserialize_month_year(&mut self) -> Result<MonthYear, DeserializeError>

Deserialize string representing month of a year. An optional day of the month can be appended or an optional week code.

§Valid formats:
  • `YYYYMM
  • `YYYYMMDD
  • `YYYYMMWW
§Valid values:
  • YYYY = 0000-9999
  • MM = 01-12
  • DD = 01-31
  • WW = w1, w2, w3, w4, w5
source

pub fn deserialize_language(&mut self) -> Result<Language, DeserializeError>

Deserialize ISO 639-1:2002 Codes for the representation of names of languages (2-character code).

source

pub fn deserialize_utc_timestamp( &mut self, ) -> Result<UtcTimestamp, DeserializeError>

Deserialize string representing time/date combination represented in UTC (Universal Time Coordinated) in either YYYYMMDD-HH:MM:SS (whole seconds) or YYYYMMDD-HH:MM:SS.sss* format, colons, dash, and period required.

§Valid values:
  • YYYY = 0000-9999,
  • MM = 01-12,
  • DD = 01-31,
  • HH = 00-23,
  • MM = 00-59,
  • SS = 00-60 (60 only if UTC leap second),
  • sss* fractions of seconds. The fractions of seconds may be empty when no fractions of seconds are conveyed (in such a case the period is not conveyed), it may include 3 digits to convey milliseconds, 6 digits to convey microseconds, 9 digits to convey nanoseconds, 12 digits to convey picoseconds;
source

pub fn deserialize_utc_time_only( &mut self, ) -> Result<UtcTimeOnly, DeserializeError>

Deserialize string representing time-only represented in UTC (Universal Time Coordinated) in either HH:MM:SS (whole seconds) or HH:MM:SS.sss* (milliseconds) format, colons, and period required.

This special-purpose field is paired with UTCDateOnly to form a proper UTCTimestamp for bandwidth-sensitive messages.

§Valid values:
  • HH = 00-23,
  • MM = 00-59,
  • SS = 00-60 (60 only if UTC leap second),
  • sss* fractions of seconds. The fractions of seconds may be empty when no fractions of seconds are conveyed (in such a case the period is not conveyed), it may include 3 digits to convey milliseconds, 6 digits to convey microseconds, 9 digits to convey nanoseconds, 12 digits to convey picoseconds; // TODO: set precision!
source

pub fn deserialize_utc_date_only( &mut self, ) -> Result<UtcDateOnly, DeserializeError>

Deserialize date represented in UTC (Universal Time Coordinated) in YYYYMMDD format.

§Valid values:
  • YYYY = 0000-9999,
  • MM = 01-12,
  • DD = 01-31.
source

pub fn deserialize_local_mkt_time( &mut self, ) -> Result<LocalMktTime, DeserializeError>

Deserialize time local to a market center. Used where offset to UTC varies throughout the year and the defining market center is identified in a corresponding field.

Format is HH:MM:SS where:

  • HH = 00-23 hours,
  • MM = 00-59 minutes,
  • SS = 00-59 seconds.

In general only the hour token is non-zero.

source

pub fn deserialize_local_mkt_date( &mut self, ) -> Result<LocalMktDate, DeserializeError>

Deserialize date of local market (as opposed to UTC) in YYYYMMDD format.

§Valid values:
  • YYYY = 0000-9999,
  • MM = 01-12,
  • DD = 01-31.
source

pub fn deserialize_tz_timestamp( &mut self, ) -> Result<TzTimestamp, DeserializeError>

Deserialize string representing a time/date combination representing local time with an offset to UTC to allow identification of local time and time zone offset of that time.

The representation is based on ISO 8601.

Format is YYYYMMDD-HH:MM:SS.sss*[Z | [ + | – hh[:mm]]] where:

  • YYYY = 0000 to 9999,
  • MM = 01-12,
  • DD = 01-31 HH = 00-23 hours,
  • MM = 00-59 minutes,
  • SS = 00-59 seconds,
  • hh = 01-12 offset hours,
  • mm = 00-59 offset minutes,
  • sss* fractions of seconds. The fractions of seconds may be empty when no fractions of seconds are conveyed (in such a case the period is not conveyed), it may include 3 digits to convey milliseconds, 6 digits to convey microseconds, 9 digits to convey nanoseconds, 12 digits to convey picoseconds;
source

pub fn deserialize_tz_timeonly( &mut self, ) -> Result<TzTimeOnly, DeserializeError>

Deserialize time of day with timezone. Time represented based on ISO 8601. This is the time with a UTC offset to allow identification of local time and time zone of that time.

Format is HH:MM[:SS][Z | [ + | – hh[:mm]]] where:

  • HH = 00-23 hours,
  • MM = 00-59 minutes,
  • SS = 00-59 seconds,
  • hh = 01-12 offset hours,
  • mm = 00-59 offset minutes.
source

pub fn deserialize_length(&mut self) -> Result<Length, DeserializeError>

Deserialize sequence of character digits without commas or decimals. Value must be positive. Fields of datatype Length are referred to as Length fields.

The Length field must be associated with a field of datatype data.

The Length field must specify the number of octets of the value contained in the associated data field up to but not including the terminating <SOH>.

source

pub fn deserialize_data(&mut self, len: usize) -> Result<Data, DeserializeError>

Deserialize raw data with no format or content restrictions, or a character string encoded as specified by MessageEncoding(347). Fields of datatype data must have an associated field of type Length. Fields of datatype data must be immediately preceded by their associated Length field.

source

pub fn deserialize_xml( &mut self, len: usize, ) -> Result<XmlData, DeserializeError>

Deserialize XML document with characterstring repertoire specified as value of XML encoding declaration.

§Requirements
  • A field of datatype XMLData must contain a well-formed document, as defined by the W3C XML recommendation.
  • Fields of datatype XMLData must have an associated field of type Length.
  • Fields of datatype XMLData must be immediately preceded by their associated Length field.
source

pub fn deserialize_int_enum<T>(&mut self) -> Result<T, DeserializeError>
where T: TryFrom<Int, Error = SessionRejectReason>,

source

pub fn deserialize_num_in_group_enum<T>( &mut self, ) -> Result<T, DeserializeError>

source

pub fn deserialize_char_enum<T>(&mut self) -> Result<T, DeserializeError>
where T: TryFrom<Char, Error = SessionRejectReason>,

source

pub fn deserialize_string_enum<T>(&mut self) -> Result<T, DeserializeError>
where for<'a> T: TryFrom<&'a FixStr, Error = SessionRejectReason>,

source

pub fn deserialize_multiple_char_value_enum<T>( &mut self, ) -> Result<Vec<T>, DeserializeError>
where T: TryFrom<Char, Error = SessionRejectReason>,

source

pub fn deserialize_multiple_string_value_enum<T>( &mut self, ) -> Result<Vec<T>, DeserializeError>
where for<'a> T: TryFrom<&'a FixStr, Error = SessionRejectReason>,

Trait Implementations§

source§

impl<'de> Debug for Deserializer<'de>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'de> Freeze for Deserializer<'de>

§

impl<'de> RefUnwindSafe for Deserializer<'de>

§

impl<'de> Send for Deserializer<'de>

§

impl<'de> Sync for Deserializer<'de>

§

impl<'de> Unpin for Deserializer<'de>

§

impl<'de> UnwindSafe for Deserializer<'de>

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more