pub struct ConnectOptions {
pub open_timeout: Duration,
pub read_timeout: Duration,
pub write_timeout: Duration,
pub per_op_timeout: Option<Duration>,
pub terminator: String,
pub access_mode: AccessMode,
pub reset_on_connect: bool,
pub retries: u32,
pub retry_backoff: Duration,
pub reconnect_on_failure: bool,
}Expand description
Options when opening an instrument session.
Fields§
§open_timeout: Duration§read_timeout: Duration§write_timeout: Duration§per_op_timeout: Option<Duration>§terminator: String§access_mode: AccessMode§reset_on_connect: bool§retries: u32§retry_backoff: Duration§reconnect_on_failure: boolWhen true, timed-out writes/queries call crate::transport::Transport::reconnect.
VISA backends return crate::error::Error::Unsupported; try_reconnect swallows
that so write/query retry still runs. TCP reconnect needs a SOCKET transport
(not VISA). Default stays true so a future reconnectable transport is opted in.
Implementations§
Source§impl ConnectOptions
impl ConnectOptions
pub fn with_read_timeout(self, timeout: Duration) -> ConnectOptions
pub fn with_per_op_timeout(self, timeout: Duration) -> ConnectOptions
Sourcepub fn io_timeout(&self) -> Duration
pub fn io_timeout(&self) -> Duration
Single I/O timeout for backends (VISA) that cannot split read vs write.
Trait Implementations§
Source§impl Clone for ConnectOptions
impl Clone for ConnectOptions
Source§fn clone(&self) -> ConnectOptions
fn clone(&self) -> ConnectOptions
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 moreSource§impl Debug for ConnectOptions
impl Debug for ConnectOptions
Source§impl Default for ConnectOptions
impl Default for ConnectOptions
Source§fn default() -> ConnectOptions
fn default() -> ConnectOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConnectOptions
impl RefUnwindSafe for ConnectOptions
impl Send for ConnectOptions
impl Sync for ConnectOptions
impl Unpin for ConnectOptions
impl UnsafeUnpin for ConnectOptions
impl UnwindSafe for ConnectOptions
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