How to define methods for a type embedded in a struct that either implemented trait A or B?

后端 未结 0 435
感情败类
感情败类 2020-11-29 13:17

I have two traits and a struct:

pub trait A {}

pub trait B {}

struct S { a: T }

I can define a method for S

相关标签:
回答
  • 消灭零回复
提交回复
热议问题