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) -> FieldDef
pub fn new(tag: u32, name: impl Into<String>, field_type: FieldType) -> FieldDef
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>) -> FieldDef
pub fn with_values(self, values: HashMap<String, String>) -> FieldDef
Adds valid values for an enumerated field.
Sourcepub fn with_description(self, description: impl Into<String>) -> FieldDef
pub fn with_description(self, description: impl Into<String>) -> FieldDef
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<FieldDef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FieldDef, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for FieldDef
impl Serialize for FieldDef
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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