pub struct Session<'a> { /* private fields */ }
Expand description
FIX Session.
Implementations§
Source§impl Session<'static>
impl Session<'static>
Sourcepub unsafe fn lookup(session_id: &SessionId) -> Result<Self, QuickFixError>
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<'_>
impl Session<'_>
Sourcepub fn logout(&mut self) -> Result<(), QuickFixError>
pub fn logout(&mut self) -> Result<(), QuickFixError>
Force session logout, and disable session.
Sourcepub fn is_logged_on(&mut self) -> Result<bool, QuickFixError>
pub fn is_logged_on(&mut self) -> Result<bool, QuickFixError>
Check if session is logged on.
Sourcepub fn send(&mut self, msg: Message) -> Result<bool, QuickFixError>
pub fn send(&mut self, msg: Message) -> Result<bool, QuickFixError>
Send message using current session.
Sourcepub fn reset(&mut self) -> Result<(), QuickFixError>
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.
Sourcepub fn logon(&mut self) -> Result<(), QuickFixError>
pub fn logon(&mut self) -> Result<(), QuickFixError>
Enable session so that logon is sent.
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more