Tour durch Rust Inhaltsverzeichnis

[Noch nicht übersetzt] Generic Function Shorthand

Rust has a shorthand for expressing generics constrained by a trait:

fn my_function(foo: impl Foo) {
    ...
}

This is equivalent to writing:

fn my_function<T>(foo: T)
where
    T:Foo
{
    ...
}