Lines Matching refs:downcast
1721 /// Attempt to downcast the box to a concrete type.
1729 /// if let Ok(string) = value.downcast::<String>() {
1740 pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
1746 /// For a safe alternative see [`downcast`].
1767 /// [`downcast`]: Self::downcast
1780 /// Attempt to downcast the box to a concrete type.
1788 /// if let Ok(string) = value.downcast::<String>() {
1799 pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
1805 /// For a safe alternative see [`downcast`].
1826 /// [`downcast`]: Self::downcast
1839 /// Attempt to downcast the box to a concrete type.
1847 /// if let Ok(string) = value.downcast::<String>() {
1858 pub fn downcast<T: Any>(self) -> Result<Box<T, A>, Self> {
1864 /// For a safe alternative see [`downcast`].
1885 /// [`downcast`]: Self::downcast
2168 /// Attempts to downcast the box to a concrete type.
2169 pub fn downcast<T: Error + 'static>(self: Box<Self>) -> Result<Box<T>, Box<dyn Error>> {
2185 /// Attempts to downcast the box to a concrete type.
2186 pub fn downcast<T: Error + 'static>(self: Box<Self>) -> Result<Box<T>, Box<dyn Error + Send>> {
2188 <dyn Error>::downcast(err).map_err(|s| unsafe {
2199 /// Attempts to downcast the box to a concrete type.
2200 pub fn downcast<T: Error + 'static>(self: Box<Self>) -> Result<Box<T>, Box<Self>> {
2202 <dyn Error>::downcast(err).map_err(|s| unsafe {