pub trait AsConnection {
// Required method
fn as_connection(&self) -> &Connection;
}Expand description
Simple trait to work around:
- AsRef isn’t implemented for T, so Connection couldn’t be owned.
- Deref doesn’t work automatically for references, so &Savepoint won’t work
- Borrow would work, but it’s not implemented for Savepoint or Transaction This is similar to Savepointable, but works immutably and doesn’t care about making savepoints.