pub async fn get<T: Any + Send + Sync>(name: &str) -> Result<Arc<T>, Error>Expand description
Retrieves named service
To satisfy compiler it’s also required to specify exact service type under which it has been stored wrapped within async_std::sync::Arc
use icee_container_rs::get;
use async_std::sync::Arc;
struct Service {};
let service: Arc<Service> = get("svc").await.unwrap();