pub fn put<T>(uri: T) -> Builder
where
Uri: TryFrom<T>,
<Uri as TryFrom<T>>::Error: Into<crate::Error>,
{
Builder::new().method(Method::PUT).uri(uri)
}
In this snippet, Uri is a type and T a generic element.
I have always seen the construction where T: SomeTrait, but not SomeType: SomeTrait<T>.
Does this construction have a name and is it documented somewhere?
It's exactly the same construct. Type: Trait is still a "trait bound", and it still means that Type has an implementation of Trait, no matter how complicated the type or trait expressions happen to be.
It's not a different construct, in one case you have a generic parameter, in another a concrete type, but they are both still types. Trait bounds can be applied to any type.