pub struct PolymarketUsStreamClient { /* private fields */ }Implementations§
Source§impl PolymarketUsStreamClient
impl PolymarketUsStreamClient
pub fn new(base_url: impl Into<String>, auth: Option<UsAuth>) -> Self
pub fn from_gateway_base_url( gateway_base_url: impl Into<String>, auth: Option<UsAuth>, ) -> Self
pub fn base_url(&self) -> &str
pub async fn connect( &self, subscriptions: Vec<StreamSubscription>, ) -> Result<ManagedStream, PolymarketUsError>
pub async fn connect_with_config( &self, subscriptions: Vec<StreamSubscription>, config: StreamConnectConfig, ) -> Result<ManagedStream, PolymarketUsError>
pub async fn run<F, Fut>( &self, subscriptions: Vec<StreamSubscription>, config: StreamConnectConfig, on_message: F, ) -> Result<(), PolymarketUsError>
Trait Implementations§
Source§impl Clone for PolymarketUsStreamClient
impl Clone for PolymarketUsStreamClient
Source§fn clone(&self) -> PolymarketUsStreamClient
fn clone(&self) -> PolymarketUsStreamClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PolymarketUsStreamClient
impl RefUnwindSafe for PolymarketUsStreamClient
impl Send for PolymarketUsStreamClient
impl Sync for PolymarketUsStreamClient
impl Unpin for PolymarketUsStreamClient
impl UnsafeUnpin for PolymarketUsStreamClient
impl UnwindSafe for PolymarketUsStreamClient
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