commit
f76a292e10
@ -1136,6 +1136,15 @@ impl Connection {
|
||||
pub fn parameter(&self, param: &str) -> Option<&str> {
|
||||
self.0.parameters.get(param).map(|s| &**s)
|
||||
}
|
||||
|
||||
/// Returns whether or not the stream has been desynchronized due to an
|
||||
/// error in the communication channel with the server.
|
||||
///
|
||||
/// If this has occurred, all further queries will immediately return an
|
||||
/// error.
|
||||
pub fn is_desynchronized(&self) -> bool {
|
||||
self.0.desynchronized
|
||||
}
|
||||
}
|
||||
|
||||
/// A stream of asynchronous Postgres notifications.
|
||||
|
@ -32,7 +32,7 @@ impl TlsStream for Stream {
|
||||
pub trait Handshake: 'static + Sync + Send {
|
||||
/// Performs a TLS handshake, returning a wrapped stream.
|
||||
fn handshake(
|
||||
self: Box<Self>,
|
||||
&self,
|
||||
host: &str,
|
||||
stream: Stream,
|
||||
) -> Box<Future<Item = Box<TlsStream>, Error = Box<Error + Sync + Send>> + Send>;
|
||||
|
@ -40,7 +40,7 @@ impl From<SslConnector> for OpenSsl {
|
||||
|
||||
impl Handshake for OpenSsl {
|
||||
fn handshake(
|
||||
self: Box<Self>,
|
||||
&self,
|
||||
host: &str,
|
||||
stream: Stream,
|
||||
) -> Box<Future<Item = Box<TlsStream>, Error = Box<Error + Sync + Send>> + Send> {
|
||||
|
Loading…
Reference in New Issue
Block a user