pub struct Connection { /* private fields */ }Expand description
TCP/TLS connection to Deribit FIX server
Implementations§
Source§impl Connection
impl Connection
Sourcepub async fn new(config: &DeribitFixConfig) -> Result<Self>
pub async fn new(config: &DeribitFixConfig) -> Result<Self>
Create a new connection to the Deribit FIX server
Sourcepub async fn send_message(&mut self, message: &FixMessage) -> Result<()>
pub async fn send_message(&mut self, message: &FixMessage) -> Result<()>
Send a FIX message
Sourcepub async fn receive_message(&mut self) -> Result<Option<FixMessage>>
pub async fn receive_message(&mut self) -> Result<Option<FixMessage>>
Receive a FIX message from the server
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if the connection is active
Auto Trait Implementations§
impl !Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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