Struct fefix::Dictionary[][src]

pub struct Dictionary { /* fields omitted */ }

Specification of the application layer of FIX Protocol.

All FIX Dictionaries have a version string which MUST be unique and established out-of-band between involved parties.

N.B. The FIX Protocol mandates separation of concerns between session and application protocol only for FIX 5.0 and subsequent versions. All FIX Dictionaries with older versions will also contain information about session layer.

Implementations

impl Dictionary[src]

pub fn new<S: ToString>(version: S) -> Self[src]

Creates a new empty FIX Dictionary named version.

Examples

use fefix::Dictionary;
let dict = Dictionary::new("FIX.foobar");

pub fn from_version(version: Version) -> Self[src]

Creates a new Dictionary according to the specification of version.

pub fn empty() -> Self[src]

Creates a new empty FIX Dictionary with FIX.??? as its version string.

pub fn get_version(&self) -> &str[src]

Returns the version string associated with this Dictionary (e.g. FIXT.1.1, FIX.4.2).

use fefix::Dictionary;
use fefix::app::Version;

let dict = Dictionary::from_version(Version::Fix44);
assert_eq!(dict.get_version(), "FIX.4.4");

pub fn abbreviation_for<S: AsRef<str>>(
    &self,
    term: S
) -> Option<Abbreviation<'_>>
[src]

Return the known abbreviation for term -if any- according to the documentation of this FIX Dictionary.

pub fn get_message_by_name<S: AsRef<str>>(&self, name: S) -> Option<Message<'_>>[src]

Returns the [Message] associated with name, if any.

use fefix::Dictionary;
use fefix::app::Version;

let dict = Dictionary::from_version(Version::Fix44);

let msg1 = dict.get_message_by_name("Heartbeat").unwrap();
let msg2 = dict.get_message_by_msg_type("0").unwrap();
assert_eq!(msg1.name(), msg2.name());

pub fn get_message_by_msg_type<S: AsRef<str>>(
    &self,
    key: S
) -> Option<Message<'_>>
[src]

pub fn get_component<S: AsRef<str>>(&self, name: S) -> Option<Component<'_>>[src]

Returns the [Component] named name, if any.

pub fn components(&self) -> impl Iterator<Item = Component<'_>>[src]

Returns an Iterator over this Dictionary's components. Items are in no particular order.

pub fn messages(&self) -> impl Iterator<Item = Message<'_>>[src]

Returns an Iterator over this Dictionary's messages. Items are in no particular order.

use fefix::Dictionary;
use fefix::app::Version;

let dict = Dictionary::from_version(Version::Fix44);
let msg = dict.messages().find(|m| m.name() == "MarketDataRequest");
assert_eq!(msg.unwrap().msg_type(), "V");

pub fn categories(&self) -> impl Iterator<Item = Category<'_>>[src]

Returns an Iterator over this Dictionary's categories. Items are in no particular order.

pub fn get_field(&self, tag: u32) -> Option<Field<'_>>[src]

Returns the [Field] associated with tag, if any.

use fefix::Dictionary;
use fefix::app::Version;

let dict = Dictionary::from_version(Version::Fix44);

let field1 = dict.get_field(112).unwrap();
let field2 = dict.get_field_by_name("TestReqID").unwrap();
assert_eq!(field1.name(), field2.name());

pub fn get_field_by_name<S: AsRef<str>>(&self, name: S) -> Option<Field<'_>>[src]

Returns the [Field] named name, if any.

pub fn save_definition_spec<S: AsRef<str>>(
    input: S
) -> Result<Self, ParseDictionaryError>
[src]

Attempts to read a QuickFIX-style specification file and convert it into a Dictionary.

Trait Implementations

impl Clone for Dictionary[src]

impl Debug for Dictionary[src]

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

impl<T> FmtForward for T

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

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

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

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.