pub struct SimpleClient { /* private fields */ }Expand description
Simplified Lightstreamer client with high-level API.
This provides an easy-to-use interface for common Lightstreamer operations.
Implementations§
Source§impl SimpleClient
impl SimpleClient
Sourcepub fn new(config: ClientConfig) -> Result<Self, LightstreamerError>
pub fn new(config: ClientConfig) -> Result<Self, LightstreamerError>
Sourcepub async fn subscribe(
&self,
params: SubscriptionParams,
) -> Result<UnboundedReceiver<ItemUpdate>, LightstreamerError>
pub async fn subscribe( &self, params: SubscriptionParams, ) -> Result<UnboundedReceiver<ItemUpdate>, LightstreamerError>
Sourcepub async fn connect(&self) -> Result<(), LightstreamerError>
pub async fn connect(&self) -> Result<(), LightstreamerError>
Sourcepub async fn disconnect(&self)
pub async fn disconnect(&self)
Disconnects from the Lightstreamer server.
Sourcepub fn shutdown_signal(&self) -> Arc<Notify>
pub fn shutdown_signal(&self) -> Arc<Notify>
Gets a clone of the shutdown signal.
This can be used to trigger shutdown from external code.
Trait Implementations§
Source§impl Clone for SimpleClient
impl Clone for SimpleClient
Source§fn clone(&self) -> SimpleClient
fn clone(&self) -> SimpleClient
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 !RefUnwindSafe for SimpleClient
impl !UnwindSafe for SimpleClient
impl Freeze for SimpleClient
impl Send for SimpleClient
impl Sync for SimpleClient
impl Unpin for SimpleClient
impl UnsafeUnpin for SimpleClient
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