1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use super::*; pub trait TryConvertInto<To, Alt>: Is<Alt> where To: ?Sized, Alt: ?Sized { fn try_convert_into(self: Box<Self>) -> Result<Box<To>, Box<Alt>>; } /*default impl<From, To, Alt> TryConvertInto<To, Alt> for From where From: ConvertInto<To> + Is<Alt> + ?Sized, To: ?Sized, Alt: ?Sized { fn try_convert_into(self: Box<Self>) -> Result<Box<To>, Box<Alt>> { Ok(self.convert_into()) } }*/