Pass function as the generic argument

后端 未结 0 868
感动是毒
感动是毒 2020-11-27 17:57

Is there a way to declare a generic trait that takes a function as the generic argument and uses it? To clarify (Non-functioning code):

pub trait Test

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