123456use std::sync::Arc;78pub use pool::NixSessionPool;9use pool::NixSessionPoolInner;10use r2d2::PooledConnection;11pub use session::{Error, Result};12pub use value::{Index, Value};1314mod pool;15mod session;16mod value;1718#[doc(hidden)]19pub mod macros;20pub mod util;21222324252627282930#[derive(Clone)]31pub struct NixSession(pub(crate) Arc<tokio::sync::Mutex<PooledConnection<NixSessionPoolInner>>>);3233impl NixSession {34 fn ptr_eq(a: &Self, b: &Self) -> bool {35 Arc::ptr_eq(&a.0, &b.0)36 }37}3839pub fn init_tokio() {40 let _ = pool::TOKIO_RUNTIME.set(tokio::runtime::Handle::current());41}