3 releases

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

#469 in Internationalization (i18n)

Download history 139/week @ 2025-01-06 14/week @ 2025-01-13 232/week @ 2025-01-20

385 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.1–8MB
~49K SLoC