Function scale_info::prelude::any::request_ref
source · 🔬This is a nightly-only experimental API. (
provide_any
)Expand description
Request a reference from the Provider
.
Examples
Get a string reference from a provider.
use std::any::{Provider, request_ref};
fn get_str(provider: &impl Provider) -> &str {
request_ref::<str>(provider).unwrap()
}