#[derive(Generic)]
Expand description
Derives a Generic instance based on HList for +
Derive Macro frunk::LabelledGeneric
#[derive(LabelledGeneric)]
Expand description
Derives a Generic instance based on Field + HList for +
Derive Macro frunk::LabelledGeneric
source · #[derive(LabelledGeneric)]
Expand description
Derives a Generic instance based on Field + HList for a given Struct (Tuple Structs not supported because they have no labels)
There may be problems if your field names contain certain characters. diff --git a/frunk/semigroup/struct.All.html b/frunk/semigroup/struct.All.html index bdaa9d97..083aafe6 100644 --- a/frunk/semigroup/struct.All.html +++ b/frunk/semigroup/struct.All.html @@ -1,14 +1,14 @@
pub struct All<T>(pub T);
Expand description
Wrapper type for boolean that acts as a bitwise && combination
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Ord> Ord for All<T>
impl<T: Ord> Ord for All<T>
source§impl<T: PartialEq> PartialEq for All<T>
impl<T: PartialEq> PartialEq for All<T>
source§impl<T: PartialOrd> PartialOrd for All<T>
impl<T: PartialOrd> PartialOrd for All<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for All<T>
impl<T: Eq> Eq for All<T>
impl<T> StructuralPartialEq for All<T>
Auto Trait Implementations§
impl<T: Copy> Copy for All<T>
impl<T: Eq> Eq for All<T>
impl<T> StructuralPartialEq for All<T>
Auto Trait Implementations§
impl<T> Freeze for All<T>where
T: Freeze,
impl<T> RefUnwindSafe for All<T>where
T: RefUnwindSafe,
impl<T> Send for All<T>where
T: Send,
impl<T> Sync for All<T>where
diff --git a/frunk/semigroup/struct.Any.html b/frunk/semigroup/struct.Any.html
index 00117d6b..2ba88c5e 100644
--- a/frunk/semigroup/struct.Any.html
+++ b/frunk/semigroup/struct.Any.html
@@ -1,14 +1,14 @@
Any in frunk::semigroup - Rust pub struct Any<T>(pub T);
Expand description
Wrapper type for boolean that acts as a bitwise || combination
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Ord> Ord for Any<T>
source§impl<T: PartialEq> PartialEq for Any<T>
source§impl<T: PartialOrd> PartialOrd for Any<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl<T: Copy> Copy for Any<T>
source§impl<T: Eq> Eq for Any<T>
source§impl<T> StructuralPartialEq for Any<T>
Auto Trait Implementations§
source§impl<T: Copy> Copy for Any<T>
source§impl<T: Eq> Eq for Any<T>
source§impl<T> StructuralPartialEq for Any<T>
Auto Trait Implementations§
§impl<T> Freeze for Any<T>where
T: Freeze,
§impl<T> RefUnwindSafe for Any<T>where
T: RefUnwindSafe,
§impl<T> Send for Any<T>where
T: Send,
§impl<T> Sync for Any<T>where
diff --git a/frunk/semigroup/struct.Product.html b/frunk/semigroup/struct.Product.html
index 0dfc60a9..f3c21ee1 100644
--- a/frunk/semigroup/struct.Product.html
+++ b/frunk/semigroup/struct.Product.html
@@ -1,14 +1,14 @@
Product in frunk::semigroup - Rust pub struct Product<T>(pub T);
Expand description
Wrapper type for types that can have a Product combination
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Ord> Ord for Product<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§impl<T: PartialEq> PartialEq for Product<T>
source§impl<T: PartialOrd> PartialOrd for Product<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl<T: Copy> Copy for Product<T>
source§impl<T: Eq> Eq for Product<T>
source§impl<T> StructuralPartialEq for Product<T>
Auto Trait Implementations§
source§impl<T: Copy> Copy for Product<T>
source§impl<T: Eq> Eq for Product<T>
source§impl<T> StructuralPartialEq for Product<T>
Auto Trait Implementations§
§impl<T> Freeze for Product<T>where
T: Freeze,
§impl<T> RefUnwindSafe for Product<T>where
T: RefUnwindSafe,
§impl<T> Send for Product<T>where
T: Send,
§impl<T> Sync for Product<T>where
diff --git a/frunk/semigroup/trait.Semigroup.html b/frunk/semigroup/trait.Semigroup.html
index d3831665..a33537e5 100644
--- a/frunk/semigroup/trait.Semigroup.html
+++ b/frunk/semigroup/trait.Semigroup.html
@@ -17,4 +17,4 @@ §Examples
if all of the sub-element types are also Semiups
source§impl<T> Semigroup for Max<T>
source§impl<T> Semigroup for Min<T>
\ No newline at end of file
+ T: Ord + Clone,
pub struct Any<T>(pub T);
Expand description
Wrapper type for boolean that acts as a bitwise || combination
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Ord> Ord for Any<T>
impl<T: Ord> Ord for Any<T>
source§impl<T: PartialEq> PartialEq for Any<T>
impl<T: PartialEq> PartialEq for Any<T>
source§impl<T: PartialOrd> PartialOrd for Any<T>
impl<T: PartialOrd> PartialOrd for Any<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for Any<T>
impl<T: Eq> Eq for Any<T>
impl<T> StructuralPartialEq for Any<T>
Auto Trait Implementations§
impl<T: Copy> Copy for Any<T>
impl<T: Eq> Eq for Any<T>
impl<T> StructuralPartialEq for Any<T>
Auto Trait Implementations§
impl<T> Freeze for Any<T>where
T: Freeze,
impl<T> RefUnwindSafe for Any<T>where
T: RefUnwindSafe,
impl<T> Send for Any<T>where
T: Send,
impl<T> Sync for Any<T>where
diff --git a/frunk/semigroup/struct.Product.html b/frunk/semigroup/struct.Product.html
index 0dfc60a9..f3c21ee1 100644
--- a/frunk/semigroup/struct.Product.html
+++ b/frunk/semigroup/struct.Product.html
@@ -1,14 +1,14 @@
Product in frunk::semigroup - Rust pub struct Product<T>(pub T);
Expand description
Wrapper type for types that can have a Product combination
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Ord> Ord for Product<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read moresource§impl<T: PartialEq> PartialEq for Product<T>
source§impl<T: PartialOrd> PartialOrd for Product<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read moresource§impl<T: Copy> Copy for Product<T>
source§impl<T: Eq> Eq for Product<T>
source§impl<T> StructuralPartialEq for Product<T>
Auto Trait Implementations§
source§impl<T: Copy> Copy for Product<T>
source§impl<T: Eq> Eq for Product<T>
source§impl<T> StructuralPartialEq for Product<T>
Auto Trait Implementations§
§impl<T> Freeze for Product<T>where
T: Freeze,
§impl<T> RefUnwindSafe for Product<T>where
T: RefUnwindSafe,
§impl<T> Send for Product<T>where
T: Send,
§impl<T> Sync for Product<T>where
diff --git a/frunk/semigroup/trait.Semigroup.html b/frunk/semigroup/trait.Semigroup.html
index d3831665..a33537e5 100644
--- a/frunk/semigroup/trait.Semigroup.html
+++ b/frunk/semigroup/trait.Semigroup.html
@@ -17,4 +17,4 @@ §Examples
if all of the sub-element types are also Semiups
source§impl<T> Semigroup for Max<T>
source§impl<T> Semigroup for Min<T>
\ No newline at end of file
+ T: Ord + Clone,
pub struct Product<T>(pub T);
Expand description
Wrapper type for types that can have a Product combination
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Ord> Ord for Product<T>
impl<T: Ord> Ord for Product<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<T: PartialEq> PartialEq for Product<T>
impl<T: PartialEq> PartialEq for Product<T>
source§impl<T: PartialOrd> PartialOrd for Product<T>
impl<T: PartialOrd> PartialOrd for Product<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy> Copy for Product<T>
impl<T: Eq> Eq for Product<T>
impl<T> StructuralPartialEq for Product<T>
Auto Trait Implementations§
impl<T: Copy> Copy for Product<T>
impl<T: Eq> Eq for Product<T>
impl<T> StructuralPartialEq for Product<T>
Auto Trait Implementations§
impl<T> Freeze for Product<T>where
T: Freeze,
impl<T> RefUnwindSafe for Product<T>where
T: RefUnwindSafe,
impl<T> Send for Product<T>where
T: Send,
impl<T> Sync for Product<T>where
diff --git a/frunk/semigroup/trait.Semigroup.html b/frunk/semigroup/trait.Semigroup.html
index d3831665..a33537e5 100644
--- a/frunk/semigroup/trait.Semigroup.html
+++ b/frunk/semigroup/trait.Semigroup.html
@@ -17,4 +17,4 @@ §Examples
if all of the sub-element types are also Semiups
source§impl<T> Semigroup for Max<T>
source§impl<T> Semigroup for Min<T>
§Examples
if all of the sub-element types are also Semiupsimpl<T> Semigroup for Max<T>
impl<T> Semigroup for Min<T>
§Example
assert_eq!(co.extract(), 5);RunTrait Implementations§
source§impl<I, Tail> CoprodInjector<I, Here> for Coproduct<I, Tail>
impl<I, Tail> CoprodInjector<I, Here> for Coproduct<I, Tail>
source§impl<Head, I, Tail, TailIndex> CoprodInjector<I, There<TailIndex>> for Coproduct<Head, Tail>where
- Tail: CoprodInjector<I, TailIndex>,
impl<Head, I, Tail, TailIndex> CoprodInjector<I, There<TailIndex>> for Coproduct<Head, Tail>where
- Tail: CoprodInjector<I, TailIndex>,
source§impl<Hd, Tl> CoprodUninjector<Hd, Here> for Coproduct<Hd, Tl>
impl<Hd, Tl> CoprodUninjector<Hd, Here> for Coproduct<Hd, Tl>
source§impl<Hd, Tl, T, N> CoprodUninjector<T, There<N>> for Coproduct<Hd, Tl>where
- Tl: CoprodUninjector<T, N>,
impl<Hd, Tl, T, N> CoprodUninjector<T, There<N>> for Coproduct<Hd, Tl>where
- Tl: CoprodUninjector<T, N>,
source§impl<Head, Tail> CoproductEmbedder<Coproduct<Head, Tail>, HNil> for CNilwhere
+ Tail: CoprodInjector<I, TailIndex>,
impl<Head, Tail> CoproductEmbedder<Coproduct<Head, Tail>, HNil> for CNilwhere
+ Tail: CoprodInjector<I, TailIndex>,
source§impl<Hd, Tl> CoprodUninjector<Hd, Here> for Coproduct<Hd, Tl>
impl<Hd, Tl> CoprodUninjector<Hd, Here> for Coproduct<Hd, Tl>
source§impl<Hd, Tl, T, N> CoprodUninjector<T, There<N>> for Coproduct<Hd, Tl>where
+ Tl: CoprodUninjector<T, N>,
impl<Hd, Tl, T, N> CoprodUninjector<T, There<N>> for Coproduct<Hd, Tl>where
+ Tl: CoprodUninjector<T, N>,
source§impl<Head, Tail, Out, NHead, NTail> CoproductEmbedder<Out, HCons<NHead, NTail>> for Coproduct<Head, Tail>where
Out: CoprodInjector<Head, NHead>,
Tail: CoproductEmbedder<Out, NTail>,
impl<Head, Tail, Out, NHead, NTail> CoproductEmbedder<Out, HCons<NHead, NTail>> for Coproduct<Head, Tail>where
Out: CoprodInjector<Head, NHead>,
Tail: CoproductEmbedder<Out, NTail>,
source§impl<F, R, FTail, CH, CTail> CoproductFoldable<HCons<F, FTail>, R> for Coproduct<CH, CTail>where
F: FnOnce(CH) -> R,
- CTail: CoproductFoldable<FTail, R>,
impl<F, R, FTail, CH, CTail> CoproductFoldable<HCons<F, FTail>, R> for Coproduct<CH, CTail>where
F: FnOnce(CH) -> R,
- CTail: CoproductFoldable<FTail, R>,
source§impl<P, R, CH, CTail> CoproductFoldable<Poly<P>, R> for Coproduct<CH, CTail>where
+ CTail: CoproductFoldable<FTail, R>,
impl<P, R, CH, CTail> CoproductFoldable<Poly<P>, R> for Coproduct<CH, CTail>where
+ CTail: CoproductFoldable<FTail, R>,
source§impl<P, R, CH, CTail> CoproductFoldable<Poly<P>, R> for Coproduct<CH, CTail>
impl<P, R, CH, CTail> CoproductFoldable<Poly<P>, R> for Coproduct<CH, CTail>
source§impl<'a, F, R, MapperTail, CH, CTail> CoproductMappable<&'a HCons<F, MapperTail>> for Coproduct<CH, CTail>where
+ CTail: CoproductFoldable<Poly<P>, R>,
impl<'a, F, R, MapperTail, CH, CTail> CoproductMappable<&'a HCons<F, MapperTail>> for Coproduct<CH, CTail>where
+ CTail: CoproductFoldable<Poly<P>, R>,
source§impl<'a, F, R, MapperTail, CH, CTail> CoproductMappable<&'a HCons<F, MapperTail>> for Coproduct<CH, CTail>
impl<'a, F, R, MapperTail, CH, CTail> CoproductMappable<&'a HCons<F, MapperTail>> for Coproduct<CH, CTail>
Implementation for mapping a Coproduct using a &hlist!
.
source§impl<'a, P, CH, CTail> CoproductMappable<&'a Poly<P>> for Coproduct<CH, CTail>where
+
impl<'a, P, CH, CTail> CoproductMappable<&'a Poly<P>> for Coproduct<CH, CTail>where
+
source§impl<'a, P, CH, CTail> CoproductMappable<&'a Poly<P>> for Coproduct<CH, CTail>
impl<'a, P, CH, CTail> CoproductMappable<&'a Poly<P>> for Coproduct<CH, CTail>
Implementation for mapping a Coproduct using a &poly_fn!
.
source§impl<'a, F, R, MapperTail, CH, CTail> CoproductMappable<&'a mut HCons<F, MapperTail>> for Coproduct<CH, CTail>where
+
impl<'a, F, R, MapperTail, CH, CTail> CoproductMappable<&'a mut HCons<F, MapperTail>> for Coproduct<CH, CTail>where
+
source§impl<'a, F, R, MapperTail, CH, CTail> CoproductMappable<&'a mut HCons<F, MapperTail>> for Coproduct<CH, CTail>
impl<'a, F, R, MapperTail, CH, CTail> CoproductMappable<&'a mut HCons<F, MapperTail>> for Coproduct<CH, CTail>
Implementation for mapping a Coproduct using a &mut hlist!
.
source§impl<'a, P, CH, CTail> CoproductMappable<&'a mut Poly<P>> for Coproduct<CH, CTail>where
+
impl<'a, P, CH, CTail> CoproductMappable<&'a mut Poly<P>> for Coproduct<CH, CTail>where
+
source§impl<'a, P, CH, CTail> CoproductMappable<&'a mut Poly<P>> for Coproduct<CH, CTail>
impl<'a, P, CH, CTail> CoproductMappable<&'a mut Poly<P>> for Coproduct<CH, CTail>
Implementation for mapping a Coproduct using a &mut poly_fn!
.
source§impl<F, R, CH, CTail> CoproductMappable<F> for Coproduct<CH, CTail>where
+
impl<F, R, CH, CTail> CoproductMappable<F> for Coproduct<CH, CTail>where
+
source§impl<F, R, CH, CTail> CoproductMappable<F> for Coproduct<CH, CTail>where
F: FnMut(CH) -> R,
CTail: CoproductMappable<F>,
impl<F, R, CH, CTail> CoproductMappable<F> for Coproduct<CH, CTail>where
F: FnMut(CH) -> R,
CTail: CoproductMappable<F>,
Implementation for mapping a Coproduct using a single function that can handle all variants.
-source§impl<F, R, MapperTail, CH, CTail> CoproductMappable<HCons<F, MapperTail>> for Coproduct<CH, CTail>where
+
impl<F, R, MapperTail, CH, CTail> CoproductMappable<HCons<F, MapperTail>> for Coproduct<CH, CTail>where
+
source§impl<F, R, MapperTail, CH, CTail> CoproductMappable<HCons<F, MapperTail>> for Coproduct<CH, CTail>where
F: FnOnce(CH) -> R,
CTail: CoproductMappable<MapperTail>,
impl<F, R, MapperTail, CH, CTail> CoproductMappable<HCons<F, MapperTail>> for Coproduct<CH, CTail>where
F: FnOnce(CH) -> R,
CTail: CoproductMappable<MapperTail>,
Implementation for mapping a Coproduct using an hlist!
.
source§impl<P, CH, CTail> CoproductMappable<Poly<P>> for Coproduct<CH, CTail>where
+
impl<P, CH, CTail> CoproductMappable<Poly<P>> for Coproduct<CH, CTail>where
+
source§impl<P, CH, CTail> CoproductMappable<Poly<P>> for Coproduct<CH, CTail>
impl<P, CH, CTail> CoproductMappable<Poly<P>> for Coproduct<CH, CTail>
Implementation for mapping a Coproduct using a poly_fn!
.
source§impl<Head, FromTail, Tail, TailIndex> CoproductSelector<FromTail, There<TailIndex>> for Coproduct<Head, Tail>where
- Tail: CoproductSelector<FromTail, TailIndex>,
impl<Head, FromTail, Tail, TailIndex> CoproductSelector<FromTail, There<TailIndex>> for Coproduct<Head, Tail>where
- Tail: CoproductSelector<FromTail, TailIndex>,
source§impl<Head, Tail> CoproductSelector<Head, Here> for Coproduct<Head, Tail>
impl<Head, Tail> CoproductSelector<Head, Here> for Coproduct<Head, Tail>
source§impl<Head, FromTail, Tail, TailIndex> CoproductTaker<FromTail, There<TailIndex>> for Coproduct<Head, Tail>where
+
impl<Head, FromTail, Tail, TailIndex> CoproductTaker<FromTail, There<TailIndex>> for Coproduct<Head, Tail>where
+
source§impl<Head, FromTail, Tail, TailIndex> CoproductSelector<FromTail, There<TailIndex>> for Coproduct<Head, Tail>where
+ Tail: CoproductSelector<FromTail, TailIndex>,
impl<Head, FromTail, Tail, TailIndex> CoproductSelector<FromTail, There<TailIndex>> for Coproduct<Head, Tail>where
+ Tail: CoproductSelector<FromTail, TailIndex>,
source§impl<Head, Tail> CoproductSelector<Head, Here> for Coproduct<Head, Tail>
impl<Head, Tail> CoproductSelector<Head, Here> for Coproduct<Head, Tail>
source§impl<Head, FromTail, Tail, TailIndex> CoproductTaker<FromTail, There<TailIndex>> for Coproduct<Head, Tail>where
Tail: CoproductTaker<FromTail, TailIndex>,
impl<Head, FromTail, Tail, TailIndex> CoproductTaker<FromTail, There<TailIndex>> for Coproduct<Head, Tail>where
Tail: CoproductTaker<FromTail, TailIndex>,
source§impl<Head, Tail> CoproductTaker<Head, Here> for Coproduct<Head, Tail>
impl<Head, Tail> CoproductTaker<Head, Here> for Coproduct<Head, Tail>
source§impl<H: PartialOrd, T: PartialOrd> PartialOrd for Coproduct<H, T>
impl<H: PartialOrd, T: PartialOrd> PartialOrd for Coproduct<H, T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more