pub fn request_ref<T, P>(provider: &'a P) -> Option<&'a T> where T: 'static + ?Sized, P: Provider + ?Sized,
provide_any
Request a reference from the Provider.
Provider
Get a string reference from a provider.
use std::any::{Provider, request_ref}; fn get_str<P: Provider>(provider: &P) -> &str { request_ref::<str, _>(provider).unwrap() }