[][src]Function pleingres::spawn_connection

pub fn spawn_connection<R: HandleRow + Request + Send + 'static, P: AsRef<Parameters> + Clone + Send + 'static>(
    p: P
) -> Result<Handle<R>, Error>

Setup a complete database connection. This is a high-level function combining the connection of a TcpStream, a postgres Connection, an initializer function (which can be used for instance to parse named statements) and a DatabaseConnection, and returning a handle into the spawned future.