pub struct Message { /* private fields */ }Implementations§
Source§impl Message
impl Message
pub const SOH: char
pub fn new(msgstr: &[u8]) -> Result<Self, MessageParseError>
pub fn header(&self) -> &Header
pub fn header_mut(&mut self) -> &mut Header
pub fn trailer(&self) -> &Trailer
pub fn trailer_mut(&mut self) -> &mut Trailer
pub fn has_valid_structure(&self) -> Result<(), MessageValidationError>
pub fn is_header_field( tag: Tag, data_dictionary: Option<&DataDictionary>, ) -> bool
pub fn is_trailer_field( tag: Tag, data_dictionary: Option<&DataDictionary>, ) -> bool
Sourcepub fn from_string<MsgFactory: MessageFactory>(
&mut self,
msgstr: &[u8],
validate: bool,
session_dd: Option<&DataDictionary>,
app_dd: Option<&DataDictionary>,
msg_factory: Option<&MsgFactory>,
ignore_body: bool,
) -> Result<(), MessageParseError>
pub fn from_string<MsgFactory: MessageFactory>( &mut self, msgstr: &[u8], validate: bool, session_dd: Option<&DataDictionary>, app_dd: Option<&DataDictionary>, msg_factory: Option<&MsgFactory>, ignore_body: bool, ) -> Result<(), MessageParseError>
Creates a Message from a FIX string.
msg_factory
If None, any groups will be constructed as generic Group objects
ignoreBody
(default false) if true, ignores all non-header and non-trailer fields.
Intended for callers that only need rejection-related information from the header.
pub fn to_string_mut(&mut self) -> String
pub fn is_admin(&self) -> bool
pub fn is_admin_msg_type(msg_type: &[u8]) -> bool
pub fn extract_begin_string(msgstr: &[u8]) -> Result<String, MessageParseError>
pub fn identify_type(msg_str: &[u8]) -> Result<&str, MessageParseError>
pub fn get_appl_ver_id(begin_string: &str) -> Result<u32, String>
pub fn reverse_route(&mut self, header: &Header)
pub fn extract_contra_session_id(&self) -> SessionId
Methods from Deref<Target = FieldMap>§
pub fn set_field_base(&mut self, field: Field, overwrite: Option<bool>) -> bool
pub fn set_field_deref<F: Deref<Target = Field> + Clone>( &mut self, field: F, overwrite: Option<bool>, ) -> bool
pub fn set_tag_value<'a, T: IntoBytes<FieldValue>>( &mut self, tag: Tag, value: T, )
pub fn set_field<'a, T: Into<Field>>(&mut self, field: T)
pub fn get_field(&self, tag: Tag) -> Option<&Field>
pub fn get_int(&self, tag: Tag) -> Result<u32, FieldMapError>
pub fn get_string(&self, tag: Tag) -> Result<String, FieldMapError>
pub fn get_string_unchecked(&self, tag: Tag) -> String
pub fn get_bool(&self, tag: Tag) -> bool
pub fn get_datetime(&self, tag: Tag) -> Result<DateTime<Utc>, ConversionError>
pub fn get_field_mut(&mut self, tag: Tag) -> Option<&mut Field>
pub fn is_field_set(&self, tag: Tag) -> bool
pub fn remove_field(&mut self, tag: Tag)
pub fn add_group(&mut self, _tag: Tag, group: &Group, set_count: Option<bool>)
Sourcepub fn get_group(&self, index: u32, field: Tag) -> Result<&Group, FieldMapError>
pub fn get_group(&self, index: u32, field: Tag) -> Result<&Group, FieldMapError>
index: Index in group starting at 1 field: Field Tag (Tag of field which contains count of group)
Sourcepub fn get_group_mut(
&mut self,
index: u32,
field: Tag,
) -> Result<&mut Group, FieldMapError>
pub fn get_group_mut( &mut self, index: u32, field: Tag, ) -> Result<&mut Group, FieldMapError>
index: Index in group starting at 1 field: Field Tag (Tag of field which contains count of group)
Sourcepub fn remove_group(
&mut self,
index: u32,
field: Tag,
) -> Result<(), FieldMapError>
pub fn remove_group( &mut self, index: u32, field: Tag, ) -> Result<(), FieldMapError>
index: Index in group starting at 1 field: Field Tag (Tag of field which contains count of group)
pub fn replace_group( &mut self, index: Tag, field: Tag, group: Group, ) -> Result<Group, FieldMapError>
pub fn group_count(&self, field: Tag) -> Result<usize, FieldMapError>
pub fn is_empty(&self) -> bool
pub fn calculate_total(&self) -> Total
pub fn len(&self) -> Length
pub fn entries<'a>(&'a self) -> impl Iterator<Item = (&'a Tag, &Field)>
pub fn clear(&mut self)
pub fn calculate_string(&self, prefields: Option<FieldOrder>) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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