Lines Matching defs:downcast
16081 assert!(r1.clone().downcast::<u32>().is_err());
16083 let r1i32 = r1.downcast::<i32>();
16087 assert!(r2.clone().downcast::<i32>().is_err());
16089 let r2str = r2.downcast::<&'static str>();
20658 /// Attempt to downcast the `Rc<dyn Any>` to a concrete type.
20667 /// if let Ok(string) = value.downcast::<String>() {
20676 pub fn downcast<T: Any>(self) -> Result<Rc<T>, Rc<dyn Any>> {
24849 /// Attempt to downcast the `Arc<dyn Any + Send + Sync>` to a concrete type.
24858 /// if let Ok(string) = value.downcast::<String>() {
24867 pub fn downcast<T>(self) -> Result<Arc<T>, Self>
26855 assert!(r1.clone().downcast::<u32>().is_err());
26857 let r1i32 = r1.downcast::<i32>();
26861 assert!(r2.clone().downcast::<i32>().is_err());
26863 let r2str = r2.downcast::<&'static str>();
51509 /// Attempt to downcast the box to a concrete type.
51517 /// if let Ok(string) = value.downcast::<String>() {
51526 pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
51541 /// Attempt to downcast the box to a concrete type.
51549 /// if let Ok(string) = value.downcast::<String>() {
51558 pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
51573 /// Attempt to downcast the box to a concrete type.
51581 /// if let Ok(string) = value.downcast::<String>() {
51590 pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
51970 match a.downcast::<i32>() {
51976 match b.downcast::<Test>() {
51986 assert!(a.downcast::<Box<Test>>().is_err());
51987 assert!(b.downcast::<Box<i32>>().is_err());