Searched refs:downcast_ref (Results 1 – 4 of 4) sorted by relevance
14 let msg = if let Some(&s) = err.downcast_ref::<&str>() {16 } else if let Some(s) = err.downcast_ref::<String>() {
16 pub(crate) fn downcast_ref<T: std::any::Any + Clone + Send + Sync + 'static>( in downcast_ref() method19 self.inner.downcast_ref::<T>() in downcast_ref()
1093 .downcast_ref::<T>() in try_get_one()1876 match value.downcast_ref::<String>() { in unwrap_string()1886 value.downcast_ref().expect(INTERNAL_ERROR_MSG) in unwrap_downcast_ref()
306 pub fn downcast_ref<T: 'static>(&self) -> Option<&T> { in downcast_ref() method307 self.inner.downcast_ref::<T>() in downcast_ref()986 assert_eq!(42u64, v.downcast_ref::<Foo>().expect("invalid downcast").0); in test_downcast_ref()