sqlx-rt 0.5.8
“Runtime abstraction used by SQLx, the Rust SQL toolkit. Not intended to be used directly.”
Large registry install base (10k+ downloads)Package is at least one year old
SHA-256783ab52bc00f8814e04fdd067ad4ecee63a5649b90adcaf0a642d9d2c5276a67
MaleculeMd(In₆)
Evidence
27:2… [cfg(all(feature = "_tls-native-tls"))]
28pub use native_tls;
29
30//
⋯5 lines
36 not(feature = "_rt-async-std"),
37))]
38pub use tokio::{
39 self, fs, io::AsyncRead, io::AsyncReadExt, io::AsyncWrite, io::AsyncWriteExt, io::ReadBuf,
40 net::TcpStream, runtime::Handle, task::spawn, task::yield_now, time::sleep, time::timeout,
41};
42
43#[cfg(all(
44 unix,
45 any(feature = "_rt-tokio", feature = "_rt-actix"),
46 not(feature = "_rt-async-std"),
47))]
48pub use tokio::net::UnixStream;
49
50#[cfg(all(
51 any(feature = "_rt-tokio", feature = "_rt-actix"),
52 not(feature = "_rt-async-std"),
53))]
54pub use tokio_runtime::{block_on, enter_runtime};
55
56#[cfg(any(feature = "_rt-tokio", feature = "_rt-actix"))]
57mod tokio_runtime {
58 use once_cell::sync::Lazy;
59 use tokio::runtime::{self, Runtime};
60
61 // lazily initialize a global runtime once for multiple invocations of the macros
62 static RUNTIME: Lazy<Runtime> = Lazy::new(|| {
63 r …
86:50… rt-async-std")),
87))]
88pub use tokio_native_tls::{TlsConnector, TlsStream};
89
90#[cfg(all(
91 feature = "_tls-rustls",
92 any(feature = "_rt-tokio", feature = "_rt-actix"),
93 not(any(fea …
140:32… x", feature = "_rt-tokio")),
141))]
142pub use async_std::{
143 self, fs, future::timeout, io::prelude::ReadExt as AsyncReadExt,
144 io::prelude::WriteExt as AsyncWriteExt, io::Read as AsyncRead, io::Write as AsyncWrite,
145 net::TcpStream, task::sleep, task::spawn, task::yield_now,
146};
147
148#[cfg(all(
149 feature = "_rt-async-std",
150 not(any(feature = "_rt-actix", feature = "_rt-tokio")), …
162:9… any(feature = "_rt-actix", feature = "_rt-tokio")),
163))]
164pub use async_std::os::unix::net::UnixStream;
165
166#[cfg(all(
167 feature = "_rt-async-std",
168 not(any(feature = "_rt-actix", feature = "_rt-tokio")),
169))]
170pub use async_std::task::block_on;
171
172#[cfg(all(
173 feature = "_rt-async-std",
174 not(any(feature = "_rt-actix", feature = "_rt-t …
1[package]
2name = "sqlx-rt"
3version = "0.5.8"
4repository = "https://github.com/launchbadge/sqlx"
5license = "MIT OR Apache-2.0"
6description = "Runtime abstraction used by SQLx, the Rust SQL toolkit. Not intended to be used directly."
7edition = "2018"
8authors = [
9 "Ryan Leckey <leckey.ryan@gmail.com>",
10 "Austin Bonander <[email protected]>",
11]
⋯12 lines
24runtime-tokio-rustls = ["_rt-tokio", "_tls-rustls", "tokio-rustls"]
25
26# Not used directly and not re-exported from sqlx
27_rt-actix = ["actix-rt", "tokio", "once_cell"]
28_rt-async-std = ["async-std"]
⋯18 lines
No evidence locations were recorded for this file. Raw result