Trait diesel::connection::MultiConnectionHelper
source · 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§
sourcefn to_any<'a>(
lookup: &mut <Self::Backend as TypeMetadata>::MetadataLookup
) -> &mut (dyn Any + 'a)
fn to_any<'a>( lookup: &mut <Self::Backend as TypeMetadata>::MetadataLookup ) -> &mut (dyn Any + 'a)
Convert the lookup type to any
sourcefn from_any(
lookup: &mut dyn Any
) -> Option<&mut <Self::Backend as TypeMetadata>::MetadataLookup>
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§
impl MultiConnectionHelper for MysqlConnection
Available on crate features
mysql
and mysql_backend
only.impl MultiConnectionHelper for PgConnection
Available on crate features
postgres
and postgres_backend
only.impl MultiConnectionHelper for SqliteConnection
Available on crate feature
sqlite
only.