Struct frunk_core::traits::Poly [−][src]
Wrapper type around a function for polymorphic maps and folds.
This is a thin generic wrapper type that is used to differentiate
between single-typed generic closures F
that implements, say, Fn(i8) -> bool
,
and a Poly-typed F
that implements multiple Function types
via the Func
trait. (say, Func<i8, Output=bool>
and Func<bool, Output=f32>
)
This is needed because there are completely generic impls for many of the HList traits that take a simple unwrapped closure.
Trait Implementations
impl<T: Clone> Clone for Poly<T>
[src]
impl<P, R, CH, CTail> CoproductFoldable<Poly<P>, R> for Coproduct<CH, CTail> where
P: Func<CH, Output = R>,
CTail: CoproductFoldable<Poly<P>, R>,
[src]
P: Func<CH, Output = R>,
CTail: CoproductFoldable<Poly<P>, R>,
impl<T: Copy> Copy for Poly<T>
[src]
impl<T: Debug> Debug for Poly<T>
[src]
impl<T: Default> Default for Poly<T>
[src]
impl<P, R, H, Tail, Acc> HFoldLeftable<Poly<P>, Acc> for HCons<H, Tail> where
Tail: HFoldLeftable<Poly<P>, R>,
P: Func<(Acc, H), Output = R>,
[src]
Tail: HFoldLeftable<Poly<P>, R>,
P: Func<(Acc, H), Output = R>,
type Output = <Tail as HFoldLeftable<Poly<P>, R>>::Output
fn foldl(self, poly: Poly<P>, acc: Acc) -> Self::Output
[src]
impl<P, R, H, Tail, Init> HFoldRightable<Poly<P>, Init> for HCons<H, Tail> where
Tail: HFoldRightable<Poly<P>, Init>,
P: Func<(H, <Tail as HFoldRightable<Poly<P>, Init>>::Output), Output = R>,
[src]
Tail: HFoldRightable<Poly<P>, Init>,
P: Func<(H, <Tail as HFoldRightable<Poly<P>, Init>>::Output), Output = R>,
impl<P, H, Tail> HMappable<Poly<P>> for HCons<H, Tail> where
P: Func<H>,
Tail: HMappable<Poly<P>>,
[src]
P: Func<H>,
Tail: HMappable<Poly<P>>,
Auto Trait Implementations
impl<T> RefUnwindSafe for Poly<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Poly<T> where
T: Send,
T: Send,
impl<T> Sync for Poly<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Poly<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Poly<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
[src]
type Remainder = Choices
pub fn subset(
Self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
[src]
Self
) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U, I> LiftInto<U, I> for T where
U: LiftFrom<T, I>,
[src]
U: LiftFrom<T, I>,
impl<Source> Sculptor<HNil, HNil> for Source
[src]
type Remainder = Source
pub fn sculpt(Self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,