pub struct ConnOpts<'a> {
pub engine: Arc<RwLock<Engine>>,
pub tx_gate: TxGate,
pub expected_password: Option<Zeroizing<String>>,
pub users: Arc<UserStore>,
pub shutdown_rx: &'a mut Receiver<bool>,
pub idle_timeout: Duration,
pub query_timeout: Duration,
pub rate_limiter: Option<&'a AuthRateLimiter>,
pub peer_addr: Option<SocketAddr>,
}Expand description
Options for a single connection, bundled to keep handle_connection’s
argument list short.
Fields§
§engine: Arc<RwLock<Engine>>§tx_gate: TxGate§expected_password: Option<Zeroizing<String>>Expected client password. Wrapped in Zeroizing so the secret is wiped
from memory on drop (defends against leaking via a core dump).
users: Arc<UserStore>Multi-user store loaded from the data dir at startup. When it has users,
the handshake authenticates (username, password) against it; when empty
the server falls back to expected_password. Shared across connections.
shutdown_rx: &'a mut Receiver<bool>§idle_timeout: Duration§query_timeout: Duration§rate_limiter: Option<&'a AuthRateLimiter>§peer_addr: Option<SocketAddr>Auto Trait Implementations§
impl<'a> !UnwindSafe for ConnOpts<'a>
impl<'a> Freeze for ConnOpts<'a>
impl<'a> RefUnwindSafe for ConnOpts<'a>
impl<'a> Send for ConnOpts<'a>
impl<'a> Sync for ConnOpts<'a>
impl<'a> Unpin for ConnOpts<'a>
impl<'a> UnsafeUnpin for ConnOpts<'a>
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