3 releases

0.1.10 Jan 23, 2025
0.1.9 Jan 22, 2025
0.1.8 Jan 9, 2025

#478 in Internationalization (i18n)

Download history 145/week @ 2025-01-07 9/week @ 2025-01-14 243/week @ 2025-01-21 14/week @ 2025-01-28 20/week @ 2025-02-04

292 downloads per month
Used in 2 crates (via static_)

MulanPSL-2.0

11KB

async_wrap

use std::ops::Deref;

pub use tokio::sync::OnceCell;

pub struct Wrap<T: 'static>(pub &'static OnceCell<T>);

impl<T: 'static> Deref for Wrap<T> {
  type Target = T;
  fn deref(&self) -> &Self::Target {
    self.0.get().unwrap()
  }
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Dependencies

~2–7.5MB
~49K SLoC