pub struct Config {
pub host: String,
pub port: u16,
pub timeout: Duration,
pub max_retries: u32,
pub retry_delay: Duration,
}Expand description
Configuration settings for TLQ client connections.
This struct contains all the configurable parameters for connecting to and interacting with a TLQ server, including network settings and retry behavior.
§Default Values
host: “localhost”port: 1337timeout: 30 secondsmax_retries: 3retry_delay: 100 milliseconds (base delay for exponential backoff)
§Examples
use tlq_client::{Config, ConfigBuilder};
use std::time::Duration;
// Using defaults
let default_config = Config::default();
assert_eq!(default_config.host, "localhost");
assert_eq!(default_config.port, 1337);
// Using builder pattern
let custom_config = ConfigBuilder::new()
.host("queue.example.com")
.port(8080)
.timeout(Duration::from_secs(60))
.max_retries(5)
.build();Fields§
§host: StringHostname or IP address of the TLQ server
port: u16Port number of the TLQ server
timeout: DurationMaximum time to wait for a single request to complete
max_retries: u32Maximum number of retry attempts for failed operations
retry_delay: DurationBase delay between retry attempts (exponential backoff multiplier)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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