set

Function set 

Source
pub async fn set<T: Any + Send + Sync>(name: &'static str, service: T)
Expand description

Stores named service

To make services singleton, each of them is wrappen within async_std::sync::Arc

use icee_container_rs::set;

struct Service {};
set("svc", Service{}).await;