LogoutEvent

Struct LogoutEvent 

pub struct LogoutEvent<'a> { /* private fields */ }
Expand description

Logout event - received when the session is closed

This event is only valid within the callback scope. It contains:

  • Logout message (if session was closed by remote side)
  • Reconnect flag (mutable) - set to true to trigger reconnection

§Lifetime

The lifetime 'a ensures this event cannot outlive the callback scope.

Implementations§

§

impl<'a> LogoutEvent<'a>

pub fn logout_message(&self) -> Option<&'a FixMessage>

Get the incoming logout message

Returns the Logout message if the session was closed by the remote side.

§Returns
  • Some(&FixMessage) - The logout message from the counterparty
  • None - If the session was closed locally (no incoming message)

pub fn reconnect_flag(&self) -> bool

Get the reconnect flag

Defaults to false.

pub fn set_reconnect_flag(&mut self, reconnect: bool)

Set the reconnect flag

Set to true to trigger automatic reconnection in a parallel thread.

§Warning

Do not set this flag to true during application shutdown, as it will cause an infinite reconnection loop.

§Arguments
  • reconnect - true to reconnect, false to stay disconnected

Auto Trait Implementations§

§

impl<'a> Freeze for LogoutEvent<'a>

§

impl<'a> RefUnwindSafe for LogoutEvent<'a>

§

impl<'a> Send for LogoutEvent<'a>

§

impl<'a> Sync for LogoutEvent<'a>

§

impl<'a> Unpin for LogoutEvent<'a>

§

impl<'a> UnwindSafe for LogoutEvent<'a>

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.