Yes, you can do that with a where
clause:
fn parse<T: Iterator>(mut args: T) -> Result<String, String>
where
<T as Iterator>::Item: ToString,
{
// ....
}
Or, since it's unambiguous which Item
is meant here, the bound can just be:
where T::Item: ToString
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…