Remove async_trait again

This commit is contained in:
Arpad Müller
2024-04-28 01:15:07 +02:00
parent 2a7bc782fd
commit f9039f7d73
4 changed files with 3 additions and 7 deletions

View File

@@ -78,17 +78,16 @@ pub fn is_expected_io_error(e: &io::Error) -> bool {
)
}
#[async_trait::async_trait]
pub trait Handler<IO>: HandlerSync<IO> {
/// Handle single query.
/// postgres_backend will issue ReadyForQuery after calling this (this
/// might be not what we want after CopyData streaming, but currently we don't
/// care). It will also flush out the output buffer.
async fn process_query(
fn process_query(
&mut self,
pgb: &mut PostgresBackend<IO>,
query_string: &str,
) -> Result<(), QueryError>;
) -> impl Future<Output = Result<(), QueryError>> + Send;
}
pub trait HandlerSync<IO> {
/// Called on startup packet receival, allows to process params.