有没有办法在Rust中创建指向方法的指针?例如,
struct Foo; impl Foo { fn bar(&self) {} fn baz(&self) {} } fn main() { let foo = Foo; let callback = foo.bar; }
rust
rust ×1