Add basic docs to MySql and Postgres Connection

This commit is contained in:
Ryan Leckey 2019-12-28 01:01:45 -08:00
parent 7b8ef0f46b
commit e16c043bf9
2 changed files with 10 additions and 0 deletions

View file

@ -14,6 +14,11 @@ use crate::mysql::protocol::{
};
use crate::url::Url;
/// An asynchronous connection to a [MySql] database.
///
/// The connection string expected by [Connection::open] should be a MySQL connection
/// string, as documented at
/// <https://dev.mysql.com/doc/refman/8.0/en/connecting-using-uri-or-key-value-pairs.html#connecting-using-uri>
pub struct MySqlConnection {
pub(super) stream: BufStream<TcpStream>,

View file

@ -11,6 +11,11 @@ use crate::postgres::protocol::{self, Decode, Encode, Message, StatementId};
use crate::postgres::PgError;
use crate::url::Url;
/// An asynchronous connection to a [Postgres] database.
///
/// The connection string expected by [Connection::open] should be a PostgreSQL connection
/// string, as documented at
/// <https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-CONNSTRING>
pub struct PgConnection {
pub(super) stream: BufStream<TcpStream>,