/// Your function receives a `TransactionAttempt` as an argument. You can use
/// this argument to call functions against the transaction, such as
/// `execute_statement`.
///
/// The function returns a special result type. See the documentation on
/// [`TransactionResult`] for more information.
Your function receives a `TransactionAttempt` as an argument. You can use
this argument to call functions against the transaction, such as
`execute_statement`.

The function returns a special result type. See the documentation on
[`TransactionResult`] for more information.
Your function receives a ` TransactionAttempt ` as an argument . You can use this argument to call functions against the transaction such as ` execute_statement ` . The function returns a special result type . See the documentation on [ ` TransactionResult ` ] for more information .
async fn list_table_names<C>(mut tx: TransactionAttempt<C>) -> TransactionResult<Vec<String>>
where
    C: QldbSession + Send + Sync + Clone,
{
    let results = tx
        .execute_statement("select value name from information_schema.user_tables")
        .await?;
    let names: Vec<String> = results
        .readers()
        .map(|reader| {
            let mut reader = reader?;
            let _ = reader.next()?;
            let s = reader.read_string()?;
            Ok(s.as_str().to_string())
        })
        .filter_map(|it: Result<String>| it.ok())
        .collect();
    tx.commit(names).await
}
async fn list_table_names < C > ( mut tx : TransactionAttempt < C > ) -> TransactionResult < Vec < String > > where C : QldbSession + Send + Sync + Clone , { let results = tx . execute_statement ( " " ) . await ? ; let names : Vec < String > = results . readers ( ) . map ( | reader | { let mut reader = reader ? ; let _ = reader . next ( ) ? ; let s = reader . read_string ( ) ? ; Ok ( s . as_str ( ) . to_string ( ) ) } ) . filter_map ( | it : Result < String > | it . ok ( ) ) . collect ( ) ; tx . commit ( names ) . await }
Your function receives a `TransactionAttempt` as an argument.
Your function receives a ` TransactionAttempt ` as an argument .
tx
TransactionAttempt<C>