Skip to main content

waveless_commons/socket_executor/
mod.rs

1// Waveless
2// Copyright (C) 2026 Oscar Alvarez Gonzalez
3
4pub mod handshake_cx;
5
6use handshake_cx::*;
7
8use crate::*;
9
10use databases::*;
11
12/// Generic methods trait to handle requests to the endpoints.
13#[typetag::serde]
14#[async_trait]
15pub trait AnySocketExecutor: AnyExt {
16    /// Executes a query using the given executor and database connection.
17    async fn execute(
18        &self,
19        handshake_cx: HandshakeCx,
20        websocket: HyperWebsocket,
21        db_conns: DbConns,
22    ) -> Result<(), Infallible>;
23}