pub struct Member { /* private fields */ }Expand description
A member reference within a message, component, or group.
Represents a usage of a field, component, or group, separate from its
MemberDefinition: the definition is shared, while the required flag
belongs to this one usage site. Instrument can be required='Y' in
NewOrderSingle and required='N' in OrderCancelRequest, both pointing
at the same definition.
Implementations§
Source§impl Member
impl Member
Sourcepub fn definition(&self) -> &MemberDefinition
pub fn definition(&self) -> &MemberDefinition
Returns a reference to the underlying definition of this member
The definition provides access to the field, component, or group that this member represents.
Sourcepub fn required(&self) -> bool
pub fn required(&self) -> bool
Returns whether this member is required in its parent container
Required members must be present in valid FIX messages.
Sourcepub fn name(&self) -> &FixStr
pub fn name(&self) -> &FixStr
Returns the name of this member
This is a convenience method that delegates to the underlying definition. Works for fields, components, and groups.
Sourcepub fn as_field(&self) -> Option<&Field>
pub fn as_field(&self) -> Option<&Field>
Returns this member as a field reference if it is a field
Sourcepub fn as_raw_data(&self) -> Option<(&Field, &Field)>
pub fn as_raw_data(&self) -> Option<(&Field, &Field)>
Returns the (length, data) field references if this member is raw data
Sourcepub fn as_component(&self) -> Option<&Component>
pub fn as_component(&self) -> Option<&Component>
Returns this member as a component reference if it is a component
Sourcepub fn as_group(&self) -> Option<&Group>
pub fn as_group(&self) -> Option<&Group>
Returns this member as a group reference if it is a group
Sourcepub fn is_raw_data(&self) -> bool
pub fn is_raw_data(&self) -> bool
Returns true if this member is a raw data pair (Length + Data/XmlData)
Sourcepub fn is_component(&self) -> bool
pub fn is_component(&self) -> bool
Returns true if this member is a component