wtx 0.44.3

A collection of different transport implementations and related tools focused primarily on web technologies.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// A specified version of `Default` indented only for arrays of arbitrary sizes.
//
// FIXME(stable): impl Default for [T; N]
pub trait DefaultArray {
  /// Returns the "default value" for the array.
  fn default_array() -> Self;
}

impl<T, const N: usize> DefaultArray for [T; N]
where
  T: Default,
{
  #[inline]
  fn default_array() -> Self {
    core::array::from_fn(|_| T::default())
  }
}