Trait frunk_core::hlist::HFoldRightable [] [src]

pub trait HFoldRightable<Folder, Init> {
    type Output;
    fn foldr(self, folder: Folder, i: Init) -> Self::Output;
}

Trait for performing a right fold over an HList

This trait is part of the implementation of the inherent method HCons::foldr. Please see that method for more information.

You only need to import this trait when working with generic HLists or Folders of unknown type. If the type of everything is known, then list.foldr(f, init) should "just work" even without the trait.

Associated Types

Required Methods

Perform a right fold over an HList.

Please see the inherent method for more information.

The only difference between that inherent method and this trait method is the location of the type parameters. (here, they are on the trait rather than the method)

Implementors