pub struct KrakenWSSClient { /* private fields */ }
Expand description
A client for connecting to Kraken websockets via the V2 protocol.
Implementations§
Source§impl KrakenWSSClient
impl KrakenWSSClient
Sourcepub fn new() -> KrakenWSSClient
pub fn new() -> KrakenWSSClient
Create a client using the default Kraken URLs.
Sourcepub fn new_with_urls(base_url: String, auth_url: String) -> KrakenWSSClient
pub fn new_with_urls(base_url: String, auth_url: String) -> KrakenWSSClient
Create a client with custom URLs.
This is most useful for use with a proxy, or for testing.
pub fn new_with_tracing( base_url: &str, auth_url: &str, trace_inbound: bool, trace_outbound: bool, ) -> KrakenWSSClient
Sourcepub async fn connect<T>(&mut self) -> Result<KrakenMessageStream<T>, WSSError>where
T: for<'d> Deserialize<'d>,
pub async fn connect<T>(&mut self) -> Result<KrakenMessageStream<T>, WSSError>where
T: for<'d> Deserialize<'d>,
Connect to the Kraken public websocket channel, returning a Result
containing a
KrakenMessageStream
of [PublicMessage
]s.
Sourcepub async fn connect_auth<T>(
&mut self,
) -> Result<KrakenMessageStream<T>, WSSError>where
T: for<'d> Deserialize<'d>,
pub async fn connect_auth<T>(
&mut self,
) -> Result<KrakenMessageStream<T>, WSSError>where
T: for<'d> Deserialize<'d>,
Connect to the Kraken private websocket channel, returning a Result
containing a
KrakenMessageStream
of [PrivateMessage
]s.
Trait Implementations§
Source§impl Clone for KrakenWSSClient
impl Clone for KrakenWSSClient
Source§fn clone(&self) -> KrakenWSSClient
fn clone(&self) -> KrakenWSSClient
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KrakenWSSClient
impl Debug for KrakenWSSClient
Auto Trait Implementations§
impl Freeze for KrakenWSSClient
impl RefUnwindSafe for KrakenWSSClient
impl Send for KrakenWSSClient
impl Sync for KrakenWSSClient
impl Unpin for KrakenWSSClient
impl UnwindSafe for KrakenWSSClient
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