Skip to main content

Message

Struct Message 

Source
pub struct Message {
    pub header: FieldMap,
    pub body: FieldMap,
    pub trailer: FieldMap,
    /* private fields */
}

Fields§

§header: FieldMap§body: FieldMap§trailer: FieldMap

Implementations§

Source§

impl Message

Source

pub fn new() -> Self

Source

pub fn with_type(msg_type: &str) -> Self

A skeleton admin/app message with MsgType set. The session layer fills in BeginString, CompIDs, MsgSeqNum, and SendingTime before sending.

Source

pub fn msg_type(&self) -> Result<String>

Source

pub fn is_admin(&self) -> bool

Source

pub fn seq_num(&self) -> Result<u64>

Source

pub fn poss_dup(&self) -> bool

Source

pub fn structure_error(&self) -> Option<Tag>

First tag found out of section order during parse, if any.

Source

pub fn parse(raw: &[u8], validate_length_checksum: bool) -> Result<Self>

Parse a single complete FIX message (as framed by crate::parser).

validate_length_checksum enforces BodyLength(9) and CheckSum(10) correctness; per the spec a failure means the message is garbled and must be ignored (no Reject, no seqnum increment).

Source

pub fn to_bytes(&self) -> Vec<u8>

Serialize, computing BodyLength(9) and CheckSum(10).

Header order matches the reference engines: 8, 9, 35, then remaining header fields in ascending tag order. Body keeps insertion (wire) order. Trailer: descending tag order (SignatureLength before Signature), CheckSum last.

Source

pub fn set_header(&mut self, tag: Tag, value: impl FixEncode)

Set a header field (helper).

Source

pub fn set(&mut self, tag: Tag, value: impl FixEncode)

Set a body field (helper).

Source

pub fn stamp_sending_time(&mut self, ts: UtcTimestamp)

Stamp SendingTime(52) with now at the given precision.

Trait Implementations§

Source§

impl Clone for Message

Source§

fn clone(&self) -> Message

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Message

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Message

Source§

fn default() -> Message

Returns the “default value” for a type. Read more
Source§

impl From<Advertisement> for Message

Source§

fn from(m: Advertisement) -> Message

Converts to this type from the input type.
Source§

impl From<AllocationInstruction> for Message

Source§

fn from(m: AllocationInstruction) -> Message

Converts to this type from the input type.
Source§

impl From<AllocationInstructionAck> for Message

Source§

fn from(m: AllocationInstructionAck) -> Message

Converts to this type from the input type.
Source§

impl From<AllocationReport> for Message

Source§

fn from(m: AllocationReport) -> Message

Converts to this type from the input type.
Source§

impl From<AllocationReportAck> for Message

Source§

fn from(m: AllocationReportAck) -> Message

Converts to this type from the input type.
Source§

impl From<AssignmentReport> for Message

Source§

fn from(m: AssignmentReport) -> Message

Converts to this type from the input type.
Source§

impl From<BidRequest> for Message

Source§

fn from(m: BidRequest) -> Message

Converts to this type from the input type.
Source§

impl From<BidResponse> for Message

Source§

fn from(m: BidResponse) -> Message

Converts to this type from the input type.
Source§

impl From<BusinessMessageReject> for Message

Source§

fn from(m: BusinessMessageReject) -> Message

Converts to this type from the input type.
Source§

impl From<CollateralAssignment> for Message

Source§

fn from(m: CollateralAssignment) -> Message

Converts to this type from the input type.
Source§

impl From<CollateralInquiry> for Message

Source§

fn from(m: CollateralInquiry) -> Message

Converts to this type from the input type.
Source§

impl From<CollateralInquiryAck> for Message

Source§

fn from(m: CollateralInquiryAck) -> Message

Converts to this type from the input type.
Source§

impl From<CollateralReport> for Message

Source§

fn from(m: CollateralReport) -> Message

Converts to this type from the input type.
Source§

impl From<CollateralRequest> for Message

Source§

fn from(m: CollateralRequest) -> Message

Converts to this type from the input type.
Source§

impl From<CollateralResponse> for Message

Source§

fn from(m: CollateralResponse) -> Message

Converts to this type from the input type.
Source§

impl From<Confirmation> for Message

Source§

fn from(m: Confirmation) -> Message

Converts to this type from the input type.
Source§

impl From<ConfirmationAck> for Message

Source§

fn from(m: ConfirmationAck) -> Message

Converts to this type from the input type.
Source§

impl From<ConfirmationRequest> for Message

Source§

fn from(m: ConfirmationRequest) -> Message

Converts to this type from the input type.
Source§

impl From<CrossOrderCancelReplaceRequest> for Message

Source§

fn from(m: CrossOrderCancelReplaceRequest) -> Message

Converts to this type from the input type.
Source§

impl From<CrossOrderCancelRequest> for Message

Source§

fn from(m: CrossOrderCancelRequest) -> Message

Converts to this type from the input type.
Source§

impl From<DerivativeSecurityList> for Message

Source§

fn from(m: DerivativeSecurityList) -> Message

Converts to this type from the input type.
Source§

impl From<DerivativeSecurityListRequest> for Message

Source§

fn from(m: DerivativeSecurityListRequest) -> Message

Converts to this type from the input type.
Source§

impl From<DontKnowTrade> for Message

Source§

fn from(m: DontKnowTrade) -> Message

Converts to this type from the input type.
Source§

impl From<Email> for Message

Source§

fn from(m: Email) -> Message

Converts to this type from the input type.
Source§

impl From<ExecutionReport> for Message

Source§

fn from(m: ExecutionReport) -> Message

Converts to this type from the input type.
Source§

impl From<Heartbeat> for Message

Source§

fn from(m: Heartbeat) -> Message

Converts to this type from the input type.
Source§

impl From<IOI> for Message

Source§

fn from(m: IOI) -> Message

Converts to this type from the input type.
Source§

impl From<ListCancelRequest> for Message

Source§

fn from(m: ListCancelRequest) -> Message

Converts to this type from the input type.
Source§

impl From<ListExecute> for Message

Source§

fn from(m: ListExecute) -> Message

Converts to this type from the input type.
Source§

impl From<ListStatus> for Message

Source§

fn from(m: ListStatus) -> Message

Converts to this type from the input type.
Source§

impl From<ListStatusRequest> for Message

Source§

fn from(m: ListStatusRequest) -> Message

Converts to this type from the input type.
Source§

impl From<ListStrikePrice> for Message

Source§

fn from(m: ListStrikePrice) -> Message

Converts to this type from the input type.
Source§

impl From<Logon> for Message

Source§

fn from(m: Logon) -> Message

Converts to this type from the input type.
Source§

impl From<Logout> for Message

Source§

fn from(m: Logout) -> Message

Converts to this type from the input type.
Source§

impl From<MarketDataIncrementalRefresh> for Message

Source§

fn from(m: MarketDataIncrementalRefresh) -> Message

Converts to this type from the input type.
Source§

impl From<MarketDataRequest> for Message

Source§

fn from(m: MarketDataRequest) -> Message

Converts to this type from the input type.
Source§

impl From<MarketDataRequestReject> for Message

Source§

fn from(m: MarketDataRequestReject) -> Message

Converts to this type from the input type.
Source§

impl From<MarketDataSnapshotFullRefresh> for Message

Source§

fn from(m: MarketDataSnapshotFullRefresh) -> Message

Converts to this type from the input type.
Source§

impl From<MassQuote> for Message

Source§

fn from(m: MassQuote) -> Message

Converts to this type from the input type.
Source§

impl From<MassQuoteAcknowledgement> for Message

Source§

fn from(m: MassQuoteAcknowledgement) -> Message

Converts to this type from the input type.
Source§

impl From<MultilegOrderCancelReplace> for Message

Source§

fn from(m: MultilegOrderCancelReplace) -> Message

Converts to this type from the input type.
Source§

impl From<NetworkCounterpartySystemStatusRequest> for Message

Source§

fn from(m: NetworkCounterpartySystemStatusRequest) -> Message

Converts to this type from the input type.
Source§

impl From<NetworkCounterpartySystemStatusResponse> for Message

Source§

fn from(m: NetworkCounterpartySystemStatusResponse) -> Message

Converts to this type from the input type.
Source§

impl From<NewOrderCross> for Message

Source§

fn from(m: NewOrderCross) -> Message

Converts to this type from the input type.
Source§

impl From<NewOrderList> for Message

Source§

fn from(m: NewOrderList) -> Message

Converts to this type from the input type.
Source§

impl From<NewOrderMultileg> for Message

Source§

fn from(m: NewOrderMultileg) -> Message

Converts to this type from the input type.
Source§

impl From<NewOrderSingle> for Message

Source§

fn from(m: NewOrderSingle) -> Message

Converts to this type from the input type.
Source§

impl From<News> for Message

Source§

fn from(m: News) -> Message

Converts to this type from the input type.
Source§

impl From<OrderCancelReject> for Message

Source§

fn from(m: OrderCancelReject) -> Message

Converts to this type from the input type.
Source§

impl From<OrderCancelReplaceRequest> for Message

Source§

fn from(m: OrderCancelReplaceRequest) -> Message

Converts to this type from the input type.
Source§

impl From<OrderCancelRequest> for Message

Source§

fn from(m: OrderCancelRequest) -> Message

Converts to this type from the input type.
Source§

impl From<OrderMassCancelReport> for Message

Source§

fn from(m: OrderMassCancelReport) -> Message

Converts to this type from the input type.
Source§

impl From<OrderMassCancelRequest> for Message

Source§

fn from(m: OrderMassCancelRequest) -> Message

Converts to this type from the input type.
Source§

impl From<OrderMassStatusRequest> for Message

Source§

fn from(m: OrderMassStatusRequest) -> Message

Converts to this type from the input type.
Source§

impl From<OrderStatusRequest> for Message

Source§

fn from(m: OrderStatusRequest) -> Message

Converts to this type from the input type.
Source§

impl From<PositionMaintenanceReport> for Message

Source§

fn from(m: PositionMaintenanceReport) -> Message

Converts to this type from the input type.
Source§

impl From<PositionMaintenanceRequest> for Message

Source§

fn from(m: PositionMaintenanceRequest) -> Message

Converts to this type from the input type.
Source§

impl From<PositionReport> for Message

Source§

fn from(m: PositionReport) -> Message

Converts to this type from the input type.
Source§

impl From<Quote> for Message

Source§

fn from(m: Quote) -> Message

Converts to this type from the input type.
Source§

impl From<QuoteCancel> for Message

Source§

fn from(m: QuoteCancel) -> Message

Converts to this type from the input type.
Source§

impl From<QuoteRequest> for Message

Source§

fn from(m: QuoteRequest) -> Message

Converts to this type from the input type.
Source§

impl From<QuoteRequestReject> for Message

Source§

fn from(m: QuoteRequestReject) -> Message

Converts to this type from the input type.
Source§

impl From<QuoteResponse> for Message

Source§

fn from(m: QuoteResponse) -> Message

Converts to this type from the input type.
Source§

impl From<QuoteStatusReport> for Message

Source§

fn from(m: QuoteStatusReport) -> Message

Converts to this type from the input type.
Source§

impl From<QuoteStatusRequest> for Message

Source§

fn from(m: QuoteStatusRequest) -> Message

Converts to this type from the input type.
Source§

impl From<RFQRequest> for Message

Source§

fn from(m: RFQRequest) -> Message

Converts to this type from the input type.
Source§

impl From<RegistrationInstructions> for Message

Source§

fn from(m: RegistrationInstructions) -> Message

Converts to this type from the input type.
Source§

impl From<RegistrationInstructionsResponse> for Message

Source§

fn from(m: RegistrationInstructionsResponse) -> Message

Converts to this type from the input type.
Source§

impl From<Reject> for Message

Source§

fn from(m: Reject) -> Message

Converts to this type from the input type.
Source§

impl From<RequestForPositions> for Message

Source§

fn from(m: RequestForPositions) -> Message

Converts to this type from the input type.
Source§

impl From<RequestForPositionsAck> for Message

Source§

fn from(m: RequestForPositionsAck) -> Message

Converts to this type from the input type.
Source§

impl From<ResendRequest> for Message

Source§

fn from(m: ResendRequest) -> Message

Converts to this type from the input type.
Source§

impl From<SecurityDefinition> for Message

Source§

fn from(m: SecurityDefinition) -> Message

Converts to this type from the input type.
Source§

impl From<SecurityDefinitionRequest> for Message

Source§

fn from(m: SecurityDefinitionRequest) -> Message

Converts to this type from the input type.
Source§

impl From<SecurityList> for Message

Source§

fn from(m: SecurityList) -> Message

Converts to this type from the input type.
Source§

impl From<SecurityListRequest> for Message

Source§

fn from(m: SecurityListRequest) -> Message

Converts to this type from the input type.
Source§

impl From<SecurityStatus> for Message

Source§

fn from(m: SecurityStatus) -> Message

Converts to this type from the input type.
Source§

impl From<SecurityStatusRequest> for Message

Source§

fn from(m: SecurityStatusRequest) -> Message

Converts to this type from the input type.
Source§

impl From<SecurityTypeRequest> for Message

Source§

fn from(m: SecurityTypeRequest) -> Message

Converts to this type from the input type.
Source§

impl From<SecurityTypes> for Message

Source§

fn from(m: SecurityTypes) -> Message

Converts to this type from the input type.
Source§

impl From<SequenceReset> for Message

Source§

fn from(m: SequenceReset) -> Message

Converts to this type from the input type.
Source§

impl From<SettlementInstructionRequest> for Message

Source§

fn from(m: SettlementInstructionRequest) -> Message

Converts to this type from the input type.
Source§

impl From<SettlementInstructions> for Message

Source§

fn from(m: SettlementInstructions) -> Message

Converts to this type from the input type.
Source§

impl From<TestRequest> for Message

Source§

fn from(m: TestRequest) -> Message

Converts to this type from the input type.
Source§

impl From<TradeCaptureReport> for Message

Source§

fn from(m: TradeCaptureReport) -> Message

Converts to this type from the input type.
Source§

impl From<TradeCaptureReportAck> for Message

Source§

fn from(m: TradeCaptureReportAck) -> Message

Converts to this type from the input type.
Source§

impl From<TradeCaptureReportRequest> for Message

Source§

fn from(m: TradeCaptureReportRequest) -> Message

Converts to this type from the input type.
Source§

impl From<TradeCaptureReportRequestAck> for Message

Source§

fn from(m: TradeCaptureReportRequestAck) -> Message

Converts to this type from the input type.
Source§

impl From<TradingSessionStatus> for Message

Source§

fn from(m: TradingSessionStatus) -> Message

Converts to this type from the input type.
Source§

impl From<TradingSessionStatusRequest> for Message

Source§

fn from(m: TradingSessionStatusRequest) -> Message

Converts to this type from the input type.
Source§

impl From<UserRequest> for Message

Source§

fn from(m: UserRequest) -> Message

Converts to this type from the input type.
Source§

impl From<UserResponse> for Message

Source§

fn from(m: UserResponse) -> Message

Converts to this type from the input type.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more