Trait imprint::TyFn [] [src]

pub trait TyFn<F: ?Sized> {
    type Output: ?Sized;
}

Used to define type-level functions.

The parameter F identifies the type function and can be whatever you want. Note that F is the main parameter rather than an auxiliary parameter: this allows users to implement their own type functions without breaking the orphan rules.

Example

use imprint::TyFn;

// define a type function that converts T into Box<T>
struct BoxTyFn;
impl<T> TyFn<T> for BoxTyFn { type Output = Box<T>; }

Associated Types

The result of the type function.

Implementors