LCOV - code coverage report
Current view: top level - libs/proxy/tokio-postgres2/src - generic_client.rs (source / functions) Coverage Total Hit
Test: 472031e0b71f3195f7f21b1f2b20de09fd07bb56.info Lines: 0.0 % 16 0
Test Date: 2025-05-26 10:37:33 Functions: 0.0 % 8 0

            Line data    Source code
       1              : #![allow(async_fn_in_trait)]
       2              : 
       3              : use crate::query::RowStream;
       4              : use crate::{Client, Error, Transaction};
       5              : 
       6              : mod private {
       7              :     pub trait Sealed {}
       8              : }
       9              : 
      10              : /// A trait allowing abstraction over connections and transactions.
      11              : ///
      12              : /// This trait is "sealed", and cannot be implemented outside of this crate.
      13              : pub trait GenericClient: private::Sealed {
      14              :     /// Like `Client::query_raw_txt`.
      15              :     async fn query_raw_txt<S, I>(&mut self, statement: &str, params: I) -> Result<RowStream, Error>
      16              :     where
      17              :         S: AsRef<str> + Sync + Send,
      18              :         I: IntoIterator<Item = Option<S>> + Sync + Send,
      19              :         I::IntoIter: ExactSizeIterator + Sync + Send;
      20              : }
      21              : 
      22              : impl private::Sealed for Client {}
      23              : 
      24              : impl GenericClient for Client {
      25            0 :     async fn query_raw_txt<S, I>(&mut self, statement: &str, params: I) -> Result<RowStream, Error>
      26            0 :     where
      27            0 :         S: AsRef<str> + Sync + Send,
      28            0 :         I: IntoIterator<Item = Option<S>> + Sync + Send,
      29            0 :         I::IntoIter: ExactSizeIterator + Sync + Send,
      30            0 :     {
      31            0 :         self.query_raw_txt(statement, params).await
      32            0 :     }
      33              : }
      34              : 
      35              : impl private::Sealed for Transaction<'_> {}
      36              : 
      37              : impl GenericClient for Transaction<'_> {
      38            0 :     async fn query_raw_txt<S, I>(&mut self, statement: &str, params: I) -> Result<RowStream, Error>
      39            0 :     where
      40            0 :         S: AsRef<str> + Sync + Send,
      41            0 :         I: IntoIterator<Item = Option<S>> + Sync + Send,
      42            0 :         I::IntoIter: ExactSizeIterator + Sync + Send,
      43            0 :     {
      44            0 :         self.query_raw_txt(statement, params).await
      45            0 :     }
      46              : }
        

Generated by: LCOV version 2.1-beta