From 45b078982ac440e7cab9d6e342ef8abb0de4142a Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 23 Dec 2018 15:58:39 -0800 Subject: [PATCH] Add accessors for the async client --- postgres/src/client.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/postgres/src/client.rs b/postgres/src/client.rs index 99d64842..6f0bea56 100644 --- a/postgres/src/client.rs +++ b/postgres/src/client.rs @@ -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 for Client {