AsConnection

Trait AsConnection 

Source
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.

Required Methods§

Implementations on Foreign Types§

Source§

impl AsConnection for &Connection

Source§

impl AsConnection for &Savepoint<'_>

Source§

impl AsConnection for &Transaction<'_>

Source§

impl AsConnection for Connection

Source§

impl AsConnection for Savepoint<'_>

Source§

impl AsConnection for Transaction<'_>

Implementors§