Module frunk::semigroup
[−]
[src]
Module for holding the Semigroup typeclass definition and typeclass instances
You can, for example, combine tuples.
use frunk::semigroup::*; let t1 = (1, 2.5f32, String::from("hi"), Some(3)); let t2 = (1, 2.5f32, String::from(" world"), None); let expected = (2, 5.0f32, String::from("hi world"), Some(3)); assert_eq!(t1.combine(&t2), expected)Run
Structs
All |
Wrapper type for boolean that acts as a bitwise && combination |
Any |
Wrapper type for boolean that acts as a bitwise || combination |
Max |
Wrapper type for types that are ordered and can have a Max combination |
Min |
Wrapper type for types that are ordered and can have a Min combination |
Product |
Wrapper type for types that can have a Product combination |
Traits
Semigroup |
A Semigroup is a class of thing that has a definable combine operation |
Functions
combine_all_option |
Given a sequence of |
combine_n |
Return this combined with itself |