wtx 0.43.1

A collection of different transport implementations and related tools focused primarily on web technologies.
Documentation
#[cfg(feature = "std")]
mod std;

use crate::misc::FromVars;
use alloc::string::String;

/// Allows the interactive reading of environment variables.
#[derive(Debug)]
pub struct EnvVars<T>(T);

impl<T> EnvVars<T>
where
  T: FromVars,
{
  /// Constructs itself based on `vars`.
  ///
  /// Intended for debugging or tests.
  #[inline]
  pub fn from_iterator(vars: impl IntoIterator<Item = (String, String)>) -> crate::Result<Self> {
    Ok(Self(T::from_vars(vars)?))
  }
}