Struct querent_synapse::querent::query::query_engine::QueryEngineManager
source · pub struct QueryEngineManager {
pub workflows: Mutex<HashMap<String, QueryEngine>>,
pub runtime: &'static PyRuntime,
}
Fields§
§workflows: Mutex<HashMap<String, QueryEngine>>
Mutex-protected map of engines for query, keyed by their unique identifier.
runtime: &'static PyRuntime
Reference to the Python runtime.
Implementations§
source§impl QueryEngineManager
impl QueryEngineManager
sourcepub fn add_workflow(&self, workflow: QueryEngine) -> Result<(), String>
pub fn add_workflow(&self, workflow: QueryEngine) -> Result<(), String>
Adds a workflow to the manager.
sourcepub fn get_workflows(&self) -> Vec<QueryEngine>
pub fn get_workflows(&self) -> Vec<QueryEngine>
Retrieves a list of all workflows managed by this manager.
sourcepub async fn start_workflows(&self) -> Result<(), QuerentError>
pub async fn start_workflows(&self) -> Result<(), QuerentError>
Starts workflows by executing their Python code asynchronously.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for QueryEngineManager
impl !RefUnwindSafe for QueryEngineManager
impl Send for QueryEngineManager
impl Sync for QueryEngineManager
impl Unpin for QueryEngineManager
impl !UnwindSafe for QueryEngineManager
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more