How can I mutate a struct in Rust to override all fields using another struct?

前端 未结 0 1493
北恋
北恋 2020-12-02 16:48

Given this example:

struct StructX {
  a: u32,
  b: u32,
}


trait TraitY {
  fn foo(info: &mut StructX) -> bo         


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