Trait scsys_core::hkt::functor::Functor

source ·
pub trait Functor<U>: HKT<U> {
    // Required method
    fn fmap<F>(&self, f: F) -> Self::T
       where F: Fn(&Self::C) -> U;
}

Required Methods§

source

fn fmap<F>(&self, f: F) -> Self::T
where F: Fn(&Self::C) -> U,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T, U> Functor<U> for Option<T>

source§

fn fmap<F>(&self, f: F) -> Option<U>
where F: Fn(&T) -> U,

source§

impl<T, U> Functor<U> for Box<T>

source§

fn fmap<F>(&self, f: F) -> Box<U>
where F: Fn(&T) -> U,

source§

impl<T, U> Functor<U> for Rc<T>

source§

fn fmap<F>(&self, f: F) -> Rc<U>
where F: Fn(&T) -> U,

source§

impl<T, U> Functor<U> for Arc<T>

source§

fn fmap<F>(&self, f: F) -> Arc<U>
where F: Fn(&T) -> U,

source§

impl<T, U> Functor<U> for Vec<T>

source§

fn fmap<F>(&self, f: F) -> Vec<U>
where F: Fn(&T) -> U,

Implementors§