How to set an associated constant from `self`

后端 未结 0 1355
梦谈多话
梦谈多话 2020-11-30 05:36

If i have a trait defined as:

pub trait foo {
  const ID: u32;
  ...

and a struct defined as:

pub struct fooStruct {
  pub id:         


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