sqlx/sqlx-core/src/blocking/connect.rs
Ryan Leckey 6c8d68e9d0
refactor: marker traits for non-blocking <Async> vs <runtime::Blocking>
- enforce compile-time errors if you try to block on an async-only runtime
   or await a blocking runtime

 - remove viral HRTB for Streams

 - support UNIX streams
2021-01-10 19:23:04 -08:00

14 lines
257 B
Rust

use super::Runtime;
pub trait Connect<Rt>: crate::Connect<Rt>
where
Rt: Runtime,
{
fn connect(url: &str) -> crate::Result<Self>
where
Self: Sized;
}
// TODO: impl Connect for Pool { ... }
// TODO: impl Connect for PgConnection { ... }