Trait IntoOverload

Source
pub trait IntoOverload<Marker>: Sized {
    type Target: Overload + 'static;

    // Required method
    fn into_overload(self) -> Self::Target;
}
Expand description

Helper trait for overloading a function. Features a special marker for managing possible different implementations on the same type.

Required Associated Types§

Source

type Target: Overload + 'static

Target overload type

Required Methods§

Source

fn into_overload(self) -> Self::Target

Turn this into a function overload.

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§

Source§

impl<R, F> IntoOverload<(F, (), R, &CompileContext)> for F
where R: GeoType + Into<AnyExpr> + 'static, F: Fn(&CompileContext, Properties) -> R + 'static,

Source§

impl<R, F> IntoOverload<(F, (), R, &mut CompileContext)> for F
where R: GeoType + Into<AnyExpr> + 'static, F: Fn(&mut CompileContext, Properties) -> R + 'static,

Source§

type Target = FunctionOverload<F, (), R, &'static mut CompileContext>

Source§

impl<T0, R, F> IntoOverload<(F, (T0,), R, &CompileContext)> for F
where T0: GeoType + 'static, R: GeoType + Into<AnyExpr> + 'static, F: Fn(T0, &CompileContext, Properties) -> R + 'static,

Source§

impl<T0, R, F> IntoOverload<(F, (T0,), R, &mut CompileContext)> for F
where T0: GeoType + 'static, R: GeoType + Into<AnyExpr> + 'static, F: Fn(T0, &mut CompileContext, Properties) -> R + 'static,

Source§

impl<T0, T1, R, F> IntoOverload<(F, (T0, T1), R, &CompileContext)> for F
where T0: GeoType + 'static, T1: GeoType + 'static, R: GeoType + Into<AnyExpr> + 'static, F: Fn(T0, T1, &CompileContext, Properties) -> R + 'static,

Source§

impl<T0, T1, R, F> IntoOverload<(F, (T0, T1), R, &mut CompileContext)> for F
where T0: GeoType + 'static, T1: GeoType + 'static, R: GeoType + Into<AnyExpr> + 'static, F: Fn(T0, T1, &mut CompileContext, Properties) -> R + 'static,

Source§

impl<T0, T1, T2, R, F> IntoOverload<(F, (T0, T1, T2), R, &CompileContext)> for F
where T0: GeoType + 'static, T1: GeoType + 'static, T2: GeoType + 'static, R: GeoType + Into<AnyExpr> + 'static, F: Fn(T0, T1, T2, &CompileContext, Properties) -> R + 'static,

Source§

impl<T0, T1, T2, R, F> IntoOverload<(F, (T0, T1, T2), R, &mut CompileContext)> for F
where T0: GeoType + 'static, T1: GeoType + 'static, T2: GeoType + 'static, R: GeoType + Into<AnyExpr> + 'static, F: Fn(T0, T1, T2, &mut CompileContext, Properties) -> R + 'static,

Source§

impl<T0, T1, T2, T3, R, F> IntoOverload<(F, (T0, T1, T2, T3), R, &CompileContext)> for F
where T0: GeoType + 'static, T1: GeoType + 'static, T2: GeoType + 'static, T3: GeoType + 'static, R: GeoType + Into<AnyExpr> + 'static, F: Fn(T0, T1, T2, T3, &CompileContext, Properties) -> R + 'static,

Source§

impl<T0, T1, T2, T3, R, F> IntoOverload<(F, (T0, T1, T2, T3), R, &mut CompileContext)> for F
where T0: GeoType + 'static, T1: GeoType + 'static, T2: GeoType + 'static, T3: GeoType + 'static, R: GeoType + Into<AnyExpr> + 'static, F: Fn(T0, T1, T2, T3, &mut CompileContext, Properties) -> R + 'static,

Source§

impl<T: Overload + 'static> IntoOverload<T> for T