File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1136,6 +1136,15 @@ impl Connection {
1136
1136
pub fn parameter ( & self , param : & str ) -> Option < & str > {
1137
1137
self . 0 . parameters . get ( param) . map ( |s| & * * s)
1138
1138
}
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
+ }
1139
1148
}
1140
1149
1141
1150
/// A stream of asynchronous Postgres notifications.
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ impl TlsStream for Stream {
32
32
pub trait Handshake : ' static + Sync + Send {
33
33
/// Performs a TLS handshake, returning a wrapped stream.
34
34
fn handshake (
35
- self : Box < Self > ,
35
+ & self ,
36
36
host : & str ,
37
37
stream : Stream ,
38
38
) -> 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 {
40
40
41
41
impl Handshake for OpenSsl {
42
42
fn handshake (
43
- self : Box < Self > ,
43
+ & self ,
44
44
host : & str ,
45
45
stream : Stream ,
46
46
) -> Box < Future < Item = Box < TlsStream > , Error = Box < Error + Sync + Send > > + Send > {
You can’t perform that action at this time.
0 commit comments