File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1136,6 +1136,15 @@ impl Connection {
11361136 pub fn parameter ( & self , param : & str ) -> Option < & str > {
11371137 self . 0 . parameters . get ( param) . map ( |s| & * * s)
11381138 }
1139+
1140+ /// Returns whether or not the stream has been desynchronized due to an
1141+ /// error in the communication channel with the server.
1142+ ///
1143+ /// If this has occurred, all further queries will immediately return an
1144+ /// error.
1145+ pub fn is_desynchronized ( & self ) -> bool {
1146+ self . 0 . desynchronized
1147+ }
11391148}
11401149
11411150/// A stream of asynchronous Postgres notifications.
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ impl TlsStream for Stream {
3232pub trait Handshake : ' static + Sync + Send {
3333 /// Performs a TLS handshake, returning a wrapped stream.
3434 fn handshake (
35- self : Box < Self > ,
35+ & self ,
3636 host : & str ,
3737 stream : Stream ,
3838 ) -> Box < Future < Item = Box < TlsStream > , Error = Box < Error + Sync + Send > > + Send > ;
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ impl From<SslConnector> for OpenSsl {
4040
4141impl Handshake for OpenSsl {
4242 fn handshake (
43- self : Box < Self > ,
43+ & self ,
4444 host : & str ,
4545 stream : Stream ,
4646 ) -> Box < Future < Item = Box < TlsStream > , Error = Box < Error + Sync + Send > > + Send > {
You can’t perform that action at this time.
0 commit comments