Struct DictionaryBuilder

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

A public API for building a Dictionary from scratch.

It’s better to normally rely on safe wrappers around this builder, such as Dictionary::from_quickfix_spec. This builder is nonetheless useful if you’re building a Dictionary from some custom format.

§Warning

DictionaryBuilder tries its best to enforce data consistency and correctness rules for the dictionaries it builds, but you shouldn’t rely on it to catch all possible errors. Make sure the dictionaries you build are correct and consistent.

Implementations§

Source§

impl DictionaryBuilder

Builder utilities

Source

pub fn new(dict: Dictionary) -> Self

Source

pub fn dict(&self) -> &Dictionary

Returns the underlying Dictionary currently being built.

Source

pub fn build(self) -> Dictionary

Returns the finished Dictionary.

Source

pub fn add_field(&mut self, field: FieldData)

Source

pub fn add_message(&mut self, message: MessageData)

Source

pub fn add_component(&mut self, component: ComponentData)

Source

pub fn add_datatype(&mut self, datatype: DatatypeData)

Source

pub fn add_category(&mut self, category: CategoryData)

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

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.