pub struct FieldDef {
pub tag: u32,
pub name: String,
pub field_type: FieldType,
pub values: Option<HashMap<String, String>>,
pub description: Option<String>,
}Expand description
Definition of a FIX field.
Fields§
§tag: u32Field tag number.
name: StringField name.
field_type: FieldTypeField data type.
values: Option<HashMap<String, String>>Valid values for enumerated fields.
description: Option<String>Field description.
Implementations§
Source§impl FieldDef
impl FieldDef
Sourcepub fn new(tag: u32, name: impl Into<String>, field_type: FieldType) -> Self
pub fn new(tag: u32, name: impl Into<String>, field_type: FieldType) -> Self
Creates a new field definition.
§Arguments
tag- The field tag numbername- The field namefield_type- The field data type
Sourcepub fn with_values(self, values: HashMap<String, String>) -> Self
pub fn with_values(self, values: HashMap<String, String>) -> Self
Adds valid values for an enumerated field.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Adds a description.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FieldDef
impl<'de> Deserialize<'de> for FieldDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FieldDef
impl RefUnwindSafe for FieldDef
impl Send for FieldDef
impl Sync for FieldDef
impl Unpin for FieldDef
impl UnwindSafe for FieldDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more