Trait fedimint_core::core::IntoDynInstance

source ·
pub trait IntoDynInstance {
    type DynType: 'static;

    // Required method
    fn into_dyn(self, instance_id: ModuleInstanceId) -> Self::DynType;
}
Expand description

A type that has a Dyn*, type erased version of itself

Use IntoDynNever in places where a given type will never actually be created, but something is needed to appease the type system.

Required Associated Types§

source

type DynType: 'static

The type erased version of the type implementing this trait

Required Methods§

source

fn into_dyn(self, instance_id: ModuleInstanceId) -> Self::DynType

Convert self into its type-erased equivalent

Implementors§

source§

impl<T> IntoDynInstance for IntoDynNever<T>
where T: 'static,

§

type DynType = T