AuthorI am the author of the odbc-api Rust ODBC bindings here.
I would suggest returning a reference to an environment with a static lifetime from environment_pooling_mssql. Similarly Connection<'a> could then become `Connection<'static>Connection<'static>.
To tackle your actual question about what needs to be sendsent between threads. Short answer: Nothing. The ODBC driver manager now does connection pooling behind the scenes. Your application just always "creates" new connections. IfWhether the connection is truly created or just reused is for the driver manager to decide. Apart from specifying it during the creation of the ODBC Environment y.