Trait Ho

Source
pub trait Ho<T>: Sized {
    type Fun: Clone;
}
Expand description

Implemented by higher order types.

A higher order type might be a concrete value, or it might be a function of some input type T.

Each higher order type has an associated function type for any argument of type T.

This makes it possible to e.g. associate PointFunc<T> with Point.

Required Associated Types§

Source

type Fun: Clone

The function type.

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.

Implementations on Foreign Types§

Source§

impl<T> Ho<Arg<T>> for f32

Source§

type Fun = Arc<dyn Fn(T) -> f32 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for f64

Source§

type Fun = Arc<dyn Fn(T) -> f64 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for i8

Source§

type Fun = Arc<dyn Fn(T) -> i8 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for i16

Source§

type Fun = Arc<dyn Fn(T) -> i16 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for i32

Source§

type Fun = Arc<dyn Fn(T) -> i32 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for i64

Source§

type Fun = Arc<dyn Fn(T) -> i64 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for isize

Source§

type Fun = Arc<dyn Fn(T) -> isize + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for u8

Source§

type Fun = Arc<dyn Fn(T) -> u8 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for u16

Source§

type Fun = Arc<dyn Fn(T) -> u16 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for u32

Source§

type Fun = Arc<dyn Fn(T) -> u32 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for u64

Source§

type Fun = Arc<dyn Fn(T) -> u64 + Sync + Send>

Source§

impl<T> Ho<Arg<T>> for usize

Source§

type Fun = Arc<dyn Fn(T) -> usize + Sync + Send>

Implementors§

Source§

impl<T: Clone> Ho<()> for T

Source§

type Fun = T