pub type SharedSession = Session<'static, Arc<Engine>>;Expand description
A Session that holds its engine by Arc: 'static + Send, with no
lifetime to thread through the caller’s types. Build one with
SharedSession::new or SharedSession::from(arc).
use std::sync::Arc;
use datalogic_rs::{Engine, SharedSession};
let engine = Arc::new(Engine::new());
let logic = engine.compile(r#"{"var": "x"}"#).unwrap();
let mut session = SharedSession::new(engine);
let handle = std::thread::spawn(move || session.eval_str(&logic, r#"{"x": 1}"#).unwrap());
assert_eq!(handle.join().unwrap(), "1");Aliased Type§
pub struct SharedSession { /* private fields */ }