Fix serde docs
This commit is contained in:
parent
1d3c540dd9
commit
31534b5734
@ -4,7 +4,8 @@ use std::io::{self, Read};
|
|||||||
use tokio_postgres::types::{ToSql, Type};
|
use tokio_postgres::types::{ToSql, Type};
|
||||||
use tokio_postgres::Error;
|
use tokio_postgres::Error;
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
use tokio_postgres::{MakeTlsConnect, Socket, TlsConnect};
|
use tokio_postgres::{Socket};
|
||||||
|
use tokio_postgres::tls::{MakeTlsConnect, TlsConnect};
|
||||||
|
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
use crate::Config;
|
use crate::Config;
|
||||||
|
@ -4,7 +4,8 @@ use log::error;
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use tokio_postgres::{Error, MakeTlsConnect, Socket, SslMode, TargetSessionAttrs, TlsConnect};
|
use tokio_postgres::tls::{MakeTlsConnect, TlsConnect};
|
||||||
|
use tokio_postgres::{Error, Socket, SslMode, TargetSessionAttrs};
|
||||||
|
|
||||||
use crate::{Client, RUNTIME};
|
use crate::{Client, RUNTIME};
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
use futures::{try_ready, Async, Future, Poll};
|
use futures::{try_ready, Async, Future, Poll};
|
||||||
use tokio_io::{AsyncRead, AsyncWrite};
|
use tokio_io::{AsyncRead, AsyncWrite};
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
use tokio_postgres::MakeTlsConnect;
|
use tokio_postgres::tls::MakeTlsConnect;
|
||||||
use tokio_postgres::{ChannelBinding, TlsConnect};
|
use tokio_postgres::tls::{ChannelBinding, TlsConnect};
|
||||||
use tokio_tls::{Connect, TlsStream};
|
use tokio_tls::{Connect, TlsStream};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -2,7 +2,7 @@ use futures::{Future, Stream};
|
|||||||
use native_tls::{self, Certificate};
|
use native_tls::{self, Certificate};
|
||||||
use tokio::net::TcpStream;
|
use tokio::net::TcpStream;
|
||||||
use tokio::runtime::current_thread::Runtime;
|
use tokio::runtime::current_thread::Runtime;
|
||||||
use tokio_postgres::TlsConnect;
|
use tokio_postgres::tls::TlsConnect;
|
||||||
|
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
use crate::MakeTlsConnector;
|
use crate::MakeTlsConnector;
|
||||||
|
@ -14,8 +14,8 @@ use std::sync::Arc;
|
|||||||
use tokio_io::{AsyncRead, AsyncWrite};
|
use tokio_io::{AsyncRead, AsyncWrite};
|
||||||
use tokio_openssl::{ConnectAsync, ConnectConfigurationExt, SslStream};
|
use tokio_openssl::{ConnectAsync, ConnectConfigurationExt, SslStream};
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
use tokio_postgres::MakeTlsConnect;
|
use tokio_postgres::tls::MakeTlsConnect;
|
||||||
use tokio_postgres::{ChannelBinding, TlsConnect};
|
use tokio_postgres::tls::{ChannelBinding, TlsConnect};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test;
|
mod test;
|
||||||
|
@ -2,7 +2,7 @@ use futures::{Future, Stream};
|
|||||||
use openssl::ssl::{SslConnector, SslMethod};
|
use openssl::ssl::{SslConnector, SslMethod};
|
||||||
use tokio::net::TcpStream;
|
use tokio::net::TcpStream;
|
||||||
use tokio::runtime::current_thread::Runtime;
|
use tokio::runtime::current_thread::Runtime;
|
||||||
use tokio_postgres::TlsConnect;
|
use tokio_postgres::tls::TlsConnect;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -110,12 +110,16 @@ use std::sync::atomic::{AtomicUsize, Ordering};
|
|||||||
use tokio_io::{AsyncRead, AsyncWrite};
|
use tokio_io::{AsyncRead, AsyncWrite};
|
||||||
|
|
||||||
pub use crate::config::*;
|
pub use crate::config::*;
|
||||||
pub use crate::error::*;
|
use crate::error::DbError;
|
||||||
|
pub use crate::error::Error;
|
||||||
pub use crate::row::*;
|
pub use crate::row::*;
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
pub use crate::socket::Socket;
|
pub use crate::socket::Socket;
|
||||||
pub use crate::stmt::Column;
|
pub use crate::stmt::Column;
|
||||||
pub use crate::tls::*;
|
#[cfg(feature = "runtime")]
|
||||||
|
use crate::tls::MakeTlsConnect;
|
||||||
|
pub use crate::tls::NoTls;
|
||||||
|
use crate::tls::TlsConnect;
|
||||||
use crate::types::{ToSql, Type};
|
use crate::types::{ToSql, Type};
|
||||||
|
|
||||||
mod config;
|
mod config;
|
||||||
@ -126,7 +130,7 @@ mod row;
|
|||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
mod socket;
|
mod socket;
|
||||||
mod stmt;
|
mod stmt;
|
||||||
mod tls;
|
pub mod tls;
|
||||||
pub mod types;
|
pub mod types;
|
||||||
|
|
||||||
fn next_statement() -> String {
|
fn next_statement() -> String {
|
||||||
|
@ -12,7 +12,8 @@ use tokio_codec::Framed;
|
|||||||
use tokio_io::{AsyncRead, AsyncWrite};
|
use tokio_io::{AsyncRead, AsyncWrite};
|
||||||
|
|
||||||
use crate::proto::{Client, Connection, MaybeTlsStream, PostgresCodec, TlsFuture};
|
use crate::proto::{Client, Connection, MaybeTlsStream, PostgresCodec, TlsFuture};
|
||||||
use crate::{ChannelBinding, Config, Error, TlsConnect};
|
use crate::tls::ChannelBinding;
|
||||||
|
use crate::{Config, Error, TlsConnect};
|
||||||
|
|
||||||
#[derive(StateMachineFuture)]
|
#[derive(StateMachineFuture)]
|
||||||
pub enum ConnectRaw<S, T>
|
pub enum ConnectRaw<S, T>
|
||||||
|
@ -6,7 +6,8 @@ use tokio_io::{AsyncRead, AsyncWrite};
|
|||||||
|
|
||||||
use crate::proto::MaybeTlsStream;
|
use crate::proto::MaybeTlsStream;
|
||||||
use crate::tls::private::ForcePrivateApi;
|
use crate::tls::private::ForcePrivateApi;
|
||||||
use crate::{ChannelBinding, Error, SslMode, TlsConnect};
|
use crate::tls::ChannelBinding;
|
||||||
|
use crate::{Error, SslMode, TlsConnect};
|
||||||
|
|
||||||
#[derive(StateMachineFuture)]
|
#[derive(StateMachineFuture)]
|
||||||
pub enum Tls<S, T>
|
pub enum Tls<S, T>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
//! TLS support.
|
||||||
|
|
||||||
use futures::future::{self, FutureResult};
|
use futures::future::{self, FutureResult};
|
||||||
use futures::{Future, Poll};
|
use futures::{Future, Poll};
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
|
@ -12,8 +12,9 @@ use tokio::runtime::current_thread::Runtime;
|
|||||||
use tokio::timer::Delay;
|
use tokio::timer::Delay;
|
||||||
use tokio_postgres::error::SqlState;
|
use tokio_postgres::error::SqlState;
|
||||||
use tokio_postgres::impls;
|
use tokio_postgres::impls;
|
||||||
|
use tokio_postgres::tls::NoTlsStream;
|
||||||
use tokio_postgres::types::{Kind, Type};
|
use tokio_postgres::types::{Kind, Type};
|
||||||
use tokio_postgres::{AsyncMessage, Client, Connection, NoTls, NoTlsStream, SimpleQueryMessage};
|
use tokio_postgres::{AsyncMessage, Client, Connection, NoTls, SimpleQueryMessage};
|
||||||
|
|
||||||
mod parse;
|
mod parse;
|
||||||
#[cfg(feature = "runtime")]
|
#[cfg(feature = "runtime")]
|
||||||
|
@ -2,7 +2,8 @@ use futures::{Future, Stream};
|
|||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
use tokio::runtime::current_thread::Runtime;
|
use tokio::runtime::current_thread::Runtime;
|
||||||
use tokio::timer::Delay;
|
use tokio::timer::Delay;
|
||||||
use tokio_postgres::{NoTls, SqlState};
|
use tokio_postgres::error::SqlState;
|
||||||
|
use tokio_postgres::NoTls;
|
||||||
|
|
||||||
fn smoke_test(s: &str) {
|
fn smoke_test(s: &str) {
|
||||||
let mut runtime = Runtime::new().unwrap();
|
let mut runtime = Runtime::new().unwrap();
|
||||||
|
Loading…
Reference in New Issue
Block a user