A generic function has type parameters, fn f<T>(...), and is checked once, for every type its parameters may take. A trait bound T: Trait restricts T to types that implement Trait, and is the only source of what the body may do with a T. Bounds are written in the angle brackets, in a where clause, or as impl Trait in a parameter’s type.
书籍暂未推出简体中文版——当前显示英文版。
Computer Science · 术语表
什么是 Generic function, trait bound?
又称: generic function · trait bound