Skip to main content

Message

Enum Message 

Source
#[non_exhaustive]
pub enum Message {
Show 23 variants Heartbeat(Heartbeat), TestRequest(TestRequest), ResendRequest(ResendRequest), Reject(Reject), SequenceReset(SequenceReset), Logout(Logout), Logon(Logon), BusinessReject(BusinessReject), MarketDataRequest(MarketDataRequest), MarketDataSnapshot(MarketDataSnapshot), MarketDataIncremental(MarketDataIncremental), MarketDataReject(MarketDataReject), SecurityListRequest(SecurityListRequest), SecurityList(SecurityList), NewOrderSingle(NewOrderSingle), OrderStatusRequest(OrderStatusRequest), OrderMassStatusRequest(OrderMassStatusRequest), RequestForPositions(RequestForPositions), PositionReport(PositionReport), OrderCancelRequest(OrderCancelRequest), OrderCancelReject(OrderCancelReject), OrderCancelReplaceRequest(OrderCancelReplaceRequest), ExecutionReport(Box<ExecutionReport>),
}
Expand description

Any message the library sends or understands.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Heartbeat(Heartbeat)

Heartbeat (0).

§

TestRequest(TestRequest)

Test request (1).

§

ResendRequest(ResendRequest)

Resend request (2).

§

Reject(Reject)

Reject (3).

§

SequenceReset(SequenceReset)

Sequence reset (4).

§

Logout(Logout)

Logout (5).

§

Logon(Logon)

Logon (A).

§

BusinessReject(BusinessReject)

Business message reject (j).

§

MarketDataRequest(MarketDataRequest)

Market data request (V).

§

MarketDataSnapshot(MarketDataSnapshot)

Market data snapshot (W).

§

MarketDataIncremental(MarketDataIncremental)

Market data incremental refresh (X).

§

MarketDataReject(MarketDataReject)

Market data request reject (Y).

§

SecurityListRequest(SecurityListRequest)

Security list request (x).

§

SecurityList(SecurityList)

Security list (y).

§

NewOrderSingle(NewOrderSingle)

New order single (D).

§

OrderStatusRequest(OrderStatusRequest)

Order status request (H).

§

OrderMassStatusRequest(OrderMassStatusRequest)

Order mass status request (AF).

§

RequestForPositions(RequestForPositions)

Request for positions (AN).

§

PositionReport(PositionReport)

Position report (AP).

§

OrderCancelRequest(OrderCancelRequest)

Order cancel request (F).

§

OrderCancelReject(OrderCancelReject)

Order cancel reject (9).

§

OrderCancelReplaceRequest(OrderCancelReplaceRequest)

Order cancel/replace request (G).

§

ExecutionReport(Box<ExecutionReport>)

Execution report (8).

Implementations§

Source§

impl Message

Source

pub const fn msg_type(&self) -> &'static str

Returns the type of the message (35).

Source

pub fn body(&self) -> Vec<Field>

Returns the fields of the body in the order of the wire.

Source

pub fn parse(msg_type: &str, body: &[Field]) -> Result<Self, FixError>

Parses the body of a message of the given type.

§Errors

Returns FixError::UnsupportedMessage for a type the library does not know, FixError::MissingField when a required field is absent and FixError::InvalidField when a value has the wrong form.

Source§

impl Message

Source

pub fn to_frame(&self, header: Header) -> Frame

Builds the frame of the message under the given header, whose message type is replaced by the one of the message.

Source

pub fn from_frame(frame: &Frame) -> Result<Self, FixError>

Parses the message a frame carries.

§Errors

Returns the errors of Message::parse.

Source

pub const fn is_administrative(&self) -> bool

Tells whether the message belongs to the session level: it is never sent again as it was, a sequence reset stands in for it.

Trait Implementations§

Source§

impl Clone for Message

Source§

fn clone(&self) -> Self

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 Eq for Message

Source§

impl From<BusinessReject> for Message

Source§

fn from(message: BusinessReject) -> Self

Converts to this type from the input type.
Source§

impl From<ExecutionReport> for Message

Source§

fn from(message: ExecutionReport) -> Self

Converts to this type from the input type.
Source§

impl From<Heartbeat> for Message

Source§

fn from(message: Heartbeat) -> Self

Converts to this type from the input type.
Source§

impl From<Logon> for Message

Source§

fn from(message: Logon) -> Self

Converts to this type from the input type.
Source§

impl From<Logout> for Message

Source§

fn from(message: Logout) -> Self

Converts to this type from the input type.
Source§

impl From<MarketDataIncremental> for Message

Source§

fn from(message: MarketDataIncremental) -> Self

Converts to this type from the input type.
Source§

impl From<MarketDataReject> for Message

Source§

fn from(message: MarketDataReject) -> Self

Converts to this type from the input type.
Source§

impl From<MarketDataRequest> for Message

Source§

fn from(message: MarketDataRequest) -> Self

Converts to this type from the input type.
Source§

impl From<MarketDataSnapshot> for Message

Source§

fn from(message: MarketDataSnapshot) -> Self

Converts to this type from the input type.
Source§

impl From<NewOrderSingle> for Message

Source§

fn from(message: NewOrderSingle) -> Self

Converts to this type from the input type.
Source§

impl From<OrderCancelReject> for Message

Source§

fn from(message: OrderCancelReject) -> Self

Converts to this type from the input type.
Source§

impl From<OrderCancelReplaceRequest> for Message

Source§

fn from(message: OrderCancelReplaceRequest) -> Self

Converts to this type from the input type.
Source§

impl From<OrderCancelRequest> for Message

Source§

fn from(message: OrderCancelRequest) -> Self

Converts to this type from the input type.
Source§

impl From<OrderMassStatusRequest> for Message

Source§

fn from(message: OrderMassStatusRequest) -> Self

Converts to this type from the input type.
Source§

impl From<OrderStatusRequest> for Message

Source§

fn from(message: OrderStatusRequest) -> Self

Converts to this type from the input type.
Source§

impl From<PositionReport> for Message

Source§

fn from(message: PositionReport) -> Self

Converts to this type from the input type.
Source§

impl From<Reject> for Message

Source§

fn from(message: Reject) -> Self

Converts to this type from the input type.
Source§

impl From<RequestForPositions> for Message

Source§

fn from(message: RequestForPositions) -> Self

Converts to this type from the input type.
Source§

impl From<ResendRequest> for Message

Source§

fn from(message: ResendRequest) -> Self

Converts to this type from the input type.
Source§

impl From<SecurityList> for Message

Source§

fn from(message: SecurityList) -> Self

Converts to this type from the input type.
Source§

impl From<SecurityListRequest> for Message

Source§

fn from(message: SecurityListRequest) -> Self

Converts to this type from the input type.
Source§

impl From<SequenceReset> for Message

Source§

fn from(message: SequenceReset) -> Self

Converts to this type from the input type.
Source§

impl From<TestRequest> for Message

Source§

fn from(message: TestRequest) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Message

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Message

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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