Skip to content

Commit 45b0789

Browse files
committed
Add accessors for the async client
1 parent 760e4a4 commit 45b0789

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

postgres/src/client.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ impl Client {
108108
pub fn is_closed(&self) -> bool {
109109
self.0.is_closed()
110110
}
111+
112+
pub fn get_ref(&self) -> &tokio_postgres::Client {
113+
&self.0
114+
}
115+
116+
pub fn get_mut(&mut self) -> &mut tokio_postgres::Client {
117+
&mut self.0
118+
}
119+
120+
pub fn into_inner(self) -> tokio_postgres::Client {
121+
self.0
122+
}
111123
}
112124

113125
impl From<tokio_postgres::Client> for Client {

0 commit comments

Comments
 (0)