pub trait MultiConnectionHelper: Connection {
    // Required methods
    fn to_any<'a>(
        lookup: &mut <Self::Backend as TypeMetadata>::MetadataLookup
    ) -> &mut (dyn Any + 'a);
    fn from_any(
        lookup: &mut dyn Any
    ) -> Option<&mut <Self::Backend as TypeMetadata>::MetadataLookup>;
}
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Expand description

This trait provides helper methods to convert a database lookup type to/from an std::any::Any reference. This is used internally by the #[derive(MultiConnection)] implementation

Required Methods§

source

fn to_any<'a>( lookup: &mut <Self::Backend as TypeMetadata>::MetadataLookup ) -> &mut (dyn Any + 'a)

Convert the lookup type to any

source

fn from_any( lookup: &mut dyn Any ) -> Option<&mut <Self::Backend as TypeMetadata>::MetadataLookup>

Get the lookup type from any

Object Safety§

This trait is not object safe.

Implementors§

source§

impl MultiConnectionHelper for MysqlConnection

Available on crate features mysql and mysql_backend only.
source§

impl MultiConnectionHelper for PgConnection

Available on crate features postgres and postgres_backend only.
source§

impl MultiConnectionHelper for SqliteConnection

Available on crate feature sqlite only.