wtx 0.28.0

A collection of different transport implementations and related tools focused primarily on web technologies.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
macro_rules! create_and_implement {
  ($fn_ty:ident, ($($tys:ident),*)) => {
    impl<$($tys,)* FUN, RSLT> Fun<($($tys,)*)> for FUN
    where
      FUN: $fn_ty($($tys,)*) -> RSLT,
    {
      type Output = RSLT;
    }
  };
}

/// Used internally for type inference.
pub trait Fun<A> {
  /// Function output.
  type Output;
}

create_and_implement!(Fn, ());