Недавние изменения ржавчины сделали более заметными для меня "объекты признаков", но у меня есть только туманное понимание того, что на самом деле делает что-то в объекте признаков. Одним из изменений, в частности, является предстоящее изменение, позволяющее объектам объектов пересылать реализации признаков во внутренний тип.
Учитывая черту Foo
, я уверен, что Box<Foo>
- объект-признак. Является ли &Foo
также признаком объекта? Как насчет других умных указателей, таких как Rc
или Arc
? Как я могу сделать свой собственный тип, который будет считаться объектом объекта?
reference упоминает объекты объектов только один раз, но не что иное, как определение.