#[batch_impl_only]Expand description
与 #[batch_impl] 相同,但丢弃 trait 定义本身,只输出 impl 块。
用于 trait 已在别处定义、只需批量生成 impl 的场景。
语法与 #[batch_impl] 完全一致。
§示例
trait Greet { fn hello(&self) -> &str; }
#[batch_impl_only(usize #hello{"hi"})]
trait Greet { fn hello(&self) -> &str; } // 此 trait 定义被丢弃,不影响已有的定义
// 这样写而不用batch_trait是为了使用指令系统,建议按trait定义处按原样写