diff --git a/tokio-postgres/src/config.rs b/tokio-postgres/src/config.rs index fe8c7f9df..55e7595c3 100644 --- a/tokio-postgres/src/config.rs +++ b/tokio-postgres/src/config.rs @@ -375,6 +375,11 @@ impl Config { &self.host } + /// Gets a mutable view of the hosts that have been added to the configuration with `host`. + pub fn get_hosts_mut(&mut self) -> &mut [Host] { + &mut self.host + } + /// Sets the hostname used during TLS certificate verification, if enabled. /// /// This can be useful if you are connecting through an SSH tunnel.