pub struct ClientConfig {
pub server_address: String,
pub adapter_set: Option<String>,
pub username: Option<String>,
pub password: Option<String>,
pub transport: Option<Transport>,
pub keepalive_interval: Option<u64>,
pub idle_timeout: Option<u64>,
pub reconnect_timeout: Option<u64>,
}Expand description
Configuration for a Lightstreamer client.
This struct provides a simple way to configure all aspects of a Lightstreamer connection with sensible defaults.
Fields§
§server_address: StringServer address (e.g., “http://push.lightstreamer.com/lightstreamer”)
adapter_set: Option<String>Adapter set name (e.g., “DEMO”)
username: Option<String>Username for authentication
password: Option<String>Password for authentication
transport: Option<Transport>Transport type to use
keepalive_interval: Option<u64>Keepalive interval in milliseconds
idle_timeout: Option<u64>Idle timeout in milliseconds
reconnect_timeout: Option<u64>Reconnect timeout in milliseconds
Implementations§
Source§impl ClientConfig
impl ClientConfig
Sourcepub fn adapter_set(self, adapter_set: impl Into<String>) -> Self
pub fn adapter_set(self, adapter_set: impl Into<String>) -> Self
Sets the adapter set name.
Sourcepub fn username(self, username: impl Into<String>) -> Self
pub fn username(self, username: impl Into<String>) -> Self
Sets the username for authentication.
Sourcepub fn password(self, password: impl Into<String>) -> Self
pub fn password(self, password: impl Into<String>) -> Self
Sets the password for authentication.
Sourcepub fn keepalive_interval(self, interval: u64) -> Self
pub fn keepalive_interval(self, interval: u64) -> Self
Sets the keepalive interval in milliseconds.
Sourcepub fn idle_timeout(self, timeout: u64) -> Self
pub fn idle_timeout(self, timeout: u64) -> Self
Sets the idle timeout in milliseconds.
Sourcepub fn reconnect_timeout(self, timeout: u64) -> Self
pub fn reconnect_timeout(self, timeout: u64) -> Self
Sets the reconnect timeout in milliseconds.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
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 ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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