[−][src]Struct frunk::traits::Poly
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 for Poly<T> where
T: Clone,
[src]
T: Clone,
impl<P, R, CH, CTail> CoproductFoldable<Poly<P>, R> for Coproduct<CH, CTail> where
CTail: CoproductFoldable<Poly<P>, R>,
P: Func<CH, Output = R>,
[src]
CTail: CoproductFoldable<Poly<P>, R>,
P: Func<CH, Output = R>,
impl<T> Copy for Poly<T> where
T: Copy,
[src]
T: Copy,
impl<T> Debug for Poly<T> where
T: Debug,
[src]
T: Debug,
impl<T> Default for Poly<T> where
T: Default,
[src]
T: Default,
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
[src]
type Remainder = Choices
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]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
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.
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>,