Because we have implemented summarize_author, the Summary trait has given us the behavior of the summarize method without requiring us to write any more code.
But a review of recent research in personality science points to the possibility that personality traits can change through persistent intervention and major….
在notify函数体中,可以调用任何来自Summarytrait的方法,比如summarize。
In the body of notify, we can call any methods on item that come from the Summary trait, like summarize.
Here, we declare a trait using the trait keyword and then the trait's name, which is Summary in this case.
对于在trait上定义的方法,必须显式导入trait的声明。
For methods defined on a trait, you have to explicitly import the trait declaration.
这种发展对植物和Trait的制造过程产生了一些影响,其中只有一种是溶于水的大麻素。
This development has had several consequences for the plant and the manufacturing processes of Trait, only one of which is cannabinoids that dissolve in water.
一个无法被派生的trait的例子是为终端用户处理格式化的Display。
An example of a trait that can't be derived is Display, which handles formatting for end users.
如此,trait可以实现很多有用的功能而只需实现一小部分特定内容。
In this way, a trait can provide a lot of useful functionality and only require implementors to specify a small part of it.
Trait和一个类相似,但仅仅旨在用细粒度和一致的方式来组合功能。
A Trait is similar to a class, but only intended to group functionality in a fine-grained and consistent way.
每一个trait都是一个可以通过trait名称来引用的动态大小类型。
Every trait is a dynamically sized type we can refer to by using the name of the trait.
不过我们在上一部分见过这种情况的解决办法:可以使用trait对象:.
We saw a solution to this in the previous section, though: we can use a trait object.
中文
Bahasa indonesia
日本語
عربى
Български
বাংলা
Český
Dansk
Deutsch
Ελληνικά
Español
Suomi
Français
עִברִית
हिंदी
Hrvatski
Magyar
Italiano
Қазақ
한국어
മലയാളം
मराठी
Bahasa malay
Nederlands
Norsk
Polski
Português
Română
Русский
Slovenský
Slovenski
Српски
Svenska
தமிழ்
తెలుగు
ไทย
Tagalog
Turkce
Українська
اردو
Tiếng việt