method

Attribute Macro method 

Source
#[method]
Expand description

标记对象函数

§Parameters

  • name: 映射的PB函数类名 (默认为Rust函数名)
  • overload: 重载次数 (默认0,意为没有重载)

§Examples

#[method(name="of_Hello")]
fn hello(&self, world: String) -> String {
    format!("hello {}!",world)
}