use std::collections::HashMap;
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct ConnectOverCdpOptions {
pub headers: Option<HashMap<String, String>>,
pub slow_mo: Option<f64>,
pub timeout: Option<f64>,
pub no_defaults: Option<bool>,
}
impl ConnectOverCdpOptions {
pub fn new() -> Self {
Self::default()
}
pub fn no_defaults(mut self, no_defaults: bool) -> Self {
self.no_defaults = Some(no_defaults);
self
}
pub fn headers(mut self, headers: HashMap<String, String>) -> Self {
self.headers = Some(headers);
self
}
pub fn slow_mo(mut self, slow_mo: f64) -> Self {
self.slow_mo = Some(slow_mo);
self
}
pub fn timeout(mut self, timeout: f64) -> Self {
self.timeout = Some(timeout);
self
}
}
#[derive(Debug, Clone, Default)]
#[non_exhaustive]
pub struct ConnectOptions {
pub headers: Option<HashMap<String, String>>,
pub slow_mo: Option<f64>,
pub timeout: Option<f64>,
}
impl ConnectOptions {
pub fn new() -> Self {
Self::default()
}
pub fn headers(mut self, headers: HashMap<String, String>) -> Self {
self.headers = Some(headers);
self
}
pub fn slow_mo(mut self, slow_mo: f64) -> Self {
self.slow_mo = Some(slow_mo);
self
}
pub fn timeout(mut self, timeout: f64) -> Self {
self.timeout = Some(timeout);
self
}
}