Trait naan::apply::ApplyOnce

source ·
pub trait ApplyOnce<F, AB>where
    Self: Functor<F, AB>,
    F: HKT1<T<AB> = Self>,{
    // Required method
    fn apply1<A, B>(self, a: F::T<A>) -> F::T<B>
       where AB: F1Once<A, Ret = B>;
}
Expand description

Apply, but specialized to know at compile-time that the function contained in F will only be called one time.

Required Methods§

source

fn apply1<A, B>(self, a: F::T<A>) -> F::T<B>where AB: F1Once<A, Ret = B>,

Implementations on Foreign Types§

source§

impl<AB> ApplyOnce<Option, AB> for Option<AB>

source§

fn apply1<A, B>(self, a: Option<A>) -> Option<B>where AB: F1Once<A, Ret = B>,

source§

impl<AB, E> ApplyOnce<ResultOk<E>, AB> for Result<AB, E>

source§

fn apply1<A, B>(self, a: Result<A, E>) -> Result<B, E>where AB: F1Once<A, Ret = B>,

Implementors§

source§

impl<T> ApplyOnce<Id, T> for Id<T>