pub fn request_value<'a, T, P>(provider: &'a P) -> Option<T> where
    T: 'static,
    P: Provider + ?Sized
Available on nightly only.
Expand description

Request a value from the Provider.

Examples

Get a string value from a provider.

use error_stack::provider::{request_value, Provider};

fn get_string<P: Provider>(provider: &P) -> String {
    request_value::<String, _>(provider).unwrap()
}