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>;
}
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.