trait DispatchKey: Sized {
type LocalId;
// Required method
fn dispatch_query<R>(
self,
genv: GlobalEnv<'_, '_>,
local: impl FnOnce(Self::LocalId) -> R,
external: impl FnOnce(Self) -> Option<R>,
default: impl FnOnce(Self) -> R,
) -> R;
}
Expand description
Required Associated Types§
Required Methods§
fn dispatch_query<R>( self, genv: GlobalEnv<'_, '_>, local: impl FnOnce(Self::LocalId) -> R, external: impl FnOnce(Self) -> Option<R>, default: impl FnOnce(Self) -> R, ) -> R
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.