FixGroup

Struct FixGroup 

pub struct FixGroup { /* private fields */ }
Expand description

Non-owning wrapper for FIX repeating group (C++ FIXGroup*)

§Safety

This wrapper is only valid while the parent FIXMessage exists. Do not store FixGroup longer than the FixMessage it came from.

§Example

use fixantenna_bindings::FixMessage;

let mut msg = FixMessage::new("D", 4).unwrap();
msg.set(447, "2").unwrap(); // NoPartyIDs = 2

if let Some(group) = msg.get_group(447) {
    println!("Group has {} entries", group.size());
}

Implementations§

§

impl FixGroup

pub fn as_ptr(&self) -> usize

Get the raw C++ pointer

pub fn size(&self) -> i32

Get the number of entries in this group

pub fn leading_field(&self) -> i32

Get the leading field tag (NoXxx field) for this group

pub fn is_supported(&self, tag: i32) -> bool

Check if a tag is supported in this group

pub fn get(&self, index: i32) -> Option<FixGroupEntry>

Get entry at specified index

Returns None if index is out of bounds

pub fn get_group(&self, tag: i32, index: i32) -> Option<FixGroup>

Get nested group from entry at specified index

Returns None if not found or index is out of bounds

pub fn len(&self) -> usize

Get number of entries (same as size)

pub fn is_empty(&self) -> bool

Check if group is empty

Trait Implementations§

§

impl Send for FixGroup

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.