Trait 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§

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§