Struct FixGroupEntry
pub struct FixGroupEntry { /* private fields */ }Expand description
Non-owning wrapper for FIX group entry (C++ TagValue*)
§Safety
This wrapper is only valid while the parent FIXMessage exists.
§Example
use fixantenna_bindings::FixMessage;
let mut msg = FixMessage::new("D", 4).unwrap();
msg.set(447, "1").unwrap(); // NoPartyIDs = 1
if let Some(group) = msg.get_group(447) {
if let Some(mut entry) = group.get(0) {
entry.set(448, "PARTY1").unwrap();
println!("PartyID: {}", entry.get(448).unwrap());
}
}Implementations§
§impl FixGroupEntry
impl FixGroupEntry
pub fn get(&self, tag: i32) -> Option<String>
pub fn get(&self, tag: i32) -> Option<String>
Get field value as string
Returns None if field doesn’t exist
pub fn remove(&mut self, tag: i32) -> bool
pub fn remove(&mut self, tag: i32) -> bool
Remove field from this entry
Returns true if field was removed, false if it didn’t exist
pub fn is_supported(&self, tag: i32) -> bool
pub fn is_supported(&self, tag: i32) -> bool
Check if tag is supported in this entry
pub fn get_uint32(&self, tag: i32) -> Result<u32, String>
pub fn get_uint32(&self, tag: i32) -> Result<u32, String>
Get field as u32
pub fn get_uint64(&self, tag: i32) -> Result<u64, String>
pub fn get_uint64(&self, tag: i32) -> Result<u64, String>
Get field as u64
pub fn get_double(&self, tag: i32) -> Result<f64, String>
pub fn get_double(&self, tag: i32) -> Result<f64, String>
Get field as f64
pub fn get_decimal(&self, tag: i32) -> Result<Decimal, String>
pub fn get_decimal(&self, tag: i32) -> Result<Decimal, String>
Get field as Decimal
pub fn get_string(&self, tag: i32) -> Result<String, String>
pub fn get_string(&self, tag: i32) -> Result<String, String>
Get field as String (with copy)
pub fn get_string_ref(&self, tag: i32) -> Result<&str, String>
pub fn get_string_ref(&self, tag: i32) -> Result<&str, String>
Get field as string slice (zero-copy, performance critical)
§Safety
The returned reference is only valid while this entry’s parent FIXMessage exists
pub fn set_decimal(&mut self, tag: i32, value: Decimal) -> Result<(), String>
pub fn set_decimal(&mut self, tag: i32, value: Decimal) -> Result<(), String>
Set field as Decimal
Trait Implementations§
impl Send for FixGroupEntry
Auto Trait Implementations§
impl Freeze for FixGroupEntry
impl RefUnwindSafe for FixGroupEntry
impl Sync for FixGroupEntry
impl Unpin for FixGroupEntry
impl UnwindSafe for FixGroupEntry
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