pub struct NodeOpt {
pub ip_port: IpPort,
pub user: Option<String>,
pub pass: Option<String>,
pub connect_timeout: Option<Duration>,
pub read_timeout: Option<Duration>,
}Expand description
Options for creating a single Node connection.
This struct holds the connection parameters for establishing a TCP connection to a VoltDB server node.
§Example
use voltdb_client_rust::{NodeOpt, IpPort};
use std::time::Duration;
let opt = NodeOpt {
ip_port: IpPort::new("localhost".to_string(), 21212),
user: Some("admin".to_string()),
pass: Some("password".to_string()),
connect_timeout: Some(Duration::from_secs(10)),
read_timeout: Some(Duration::from_secs(30)),
};Fields§
§ip_port: IpPortThe host and port to connect to.
user: Option<String>Optional username for authentication.
pass: Option<String>Optional password for authentication.
connect_timeout: Option<Duration>Connection timeout. If None, the connection attempt will block indefinitely.
read_timeout: Option<Duration>Read timeout for socket operations. If None, reads will block indefinitely.
This affects the background listener thread that receives responses from the server.
Auto Trait Implementations§
impl Freeze for NodeOpt
impl RefUnwindSafe for NodeOpt
impl Send for NodeOpt
impl Sync for NodeOpt
impl Unpin for NodeOpt
impl UnwindSafe for NodeOpt
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