Function std::error::request_ref
source · pub fn request_ref<'a, T>(err: &'a (impl Error + ?Sized)) -> Option<&'a T>where
T: 'static + ?Sized,
🔬This is a nightly-only experimental API. (
error_generic_member_access
#99301)Expand description
Requests a reference of type T
from the given impl Error
.
§Examples
Get a string reference from an error.