Add accessors for the async client

This commit is contained in:
Steven Fackler
2018-12-23 15:58:39 -08:00
parent 760e4a4f3b
commit 45b078982a

View File

@@ -108,6 +108,18 @@ impl Client {
pub fn is_closed(&self) -> bool {
self.0.is_closed()
}
pub fn get_ref(&self) -> &tokio_postgres::Client {
&self.0
}
pub fn get_mut(&mut self) -> &mut tokio_postgres::Client {
&mut self.0
}
pub fn into_inner(self) -> tokio_postgres::Client {
self.0
}
}
impl From<tokio_postgres::Client> for Client {