Skip to main content

waveless_commons/http_executor/
mod.rs

1// Waveless
2// Copyright (C) 2026 Oscar Alvarez Gonzalez
3
4pub mod execution_atom;
5pub mod pipeline_cx;
6pub mod request_cx;
7pub mod response_cx;
8
9pub use execution_atom::*;
10pub use pipeline_cx::*;
11pub use request_cx::*;
12pub use response_cx::*;
13
14use crate::*;
15
16use databases::*;
17
18pub type PipelineResult = Result<(PipelineCx, PipelineAction), RequestError>;
19
20/// Generic executor trait - this is the main trait that endpoint executors will implement.
21#[typetag::serde]
22#[async_trait]
23pub trait AnyHttpExecutor: AnyExt {
24    /// Executes a query using the given executor and database connection.
25    async fn execute(&self, cx: PipelineCx, db_conns: DbConns) -> PipelineResult;
26}