lightstreamer-rs 0.3.1

A Rust client for Lightstreamer, designed to facilitate real-time communication with Lightstreamer servers.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/******************************************************************************
   Author: Joaquín Béjar García
   Email: jb@taunais.com
   Date: 16/5/25
******************************************************************************/
use crate::subscription::Subscription;

/// A request to subscribe or unsubscribe from a Lightstreamer data stream.
///
/// This struct is used internally by the LightstreamerClient to manage subscription
/// and unsubscription operations. It contains either a Subscription object for new
/// subscriptions or a subscription ID for unsubscribing from an existing subscription.
pub struct SubscriptionRequest {
    /// The subscription to be added. Set to None when unsubscribing.
    pub(crate) subscription: Option<Subscription>,
    /// The ID of the subscription to be removed. Set to None when subscribing.
    pub(crate) subscription_id: Option<usize>,
}