pub struct ConnectionConfig {
pub connect_timeout: Duration,
pub read_timeout: Duration,
pub write_timeout: Duration,
}Expand description
Connection configuration for the Nanonis TCP client.
Contains timeout settings for different phases of the TCP connection lifecycle. All timeouts have sensible defaults but can be customized for specific network conditions.
§Examples
use std::time::Duration;
use nanonis_rs::ConnectionConfig;
// Use default timeouts
let config = ConnectionConfig::default();
// Customize timeouts for slow network
let config = ConnectionConfig {
connect_timeout: Duration::from_secs(30),
read_timeout: Duration::from_secs(60),
write_timeout: Duration::from_secs(10),
};Fields§
§connect_timeout: DurationTimeout for establishing the initial TCP connection
read_timeout: DurationTimeout for reading data from the Nanonis server
write_timeout: DurationTimeout for writing data to the Nanonis server
Trait Implementations§
Source§impl Clone for ConnectionConfig
impl Clone for ConnectionConfig
Source§fn clone(&self) -> ConnectionConfig
fn clone(&self) -> ConnectionConfig
Returns a duplicate 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 ConnectionConfig
impl Debug for ConnectionConfig
Auto Trait Implementations§
impl Freeze for ConnectionConfig
impl RefUnwindSafe for ConnectionConfig
impl Send for ConnectionConfig
impl Sync for ConnectionConfig
impl Unpin for ConnectionConfig
impl UnwindSafe for ConnectionConfig
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