A trait is a named set of method signatures, and possibly of associated types and constants, that a type may provide. A trait implementation, impl Trait for Type { ... }, gives the bodies for one type. A default method is a method whose body is written in the trait itself, in terms of the other methods; an implementation may keep it or replace it.
书籍暂未推出简体中文版——当前显示英文版。
Computer Science · 术语表
什么是 Trait, trait implementation, default method?
又称: trait · trait implementation · default method