Implement a struct's function for specific type in Rust

后端 未结 0 1466
一整个雨季
一整个雨季 2020-11-29 18:58

In code below, I am trying to implement a generic struct. What I want to achieve is, for T whose type is String, print self.x value, and for all other types, pr

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