Struct Session

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

FIX Session.

Implementations§

Source§

impl Session<'static>

Source

pub unsafe fn lookup(session_id: &SessionId) -> Result<Self, QuickFixError>

Find a session by its ID.

§Safety

Function is unsafe because there is no way to bind FIX session lifetime to rust session lifetime.

Use SessionContainer::session instead. It will give you a safe scope where session has been borrowed to the acceptor / initiator.

Source§

impl Session<'_>

Source

pub fn logout(&mut self) -> Result<(), QuickFixError>

Force session logout, and disable session.

Source

pub fn is_logged_on(&mut self) -> Result<bool, QuickFixError>

Check if session is logged on.

Source

pub fn send(&mut self, msg: Message) -> Result<bool, QuickFixError>

Send message using current session.

Source

pub fn reset(&mut self) -> Result<(), QuickFixError>

Reset session by sending a logout & disconnecting, but still keeping the session enabled, so that logon is retried.

Source

pub fn logon(&mut self) -> Result<(), QuickFixError>

Enable session so that logon is sent.

Trait Implementations§

Source§

impl Debug for Session<'_>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Session<'a>

§

impl<'a> RefUnwindSafe for Session<'a>

§

impl<'a> !Send for Session<'a>

§

impl<'a> !Sync for Session<'a>

§

impl<'a> Unpin for Session<'a>

§

impl<'a> UnwindSafe for Session<'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.