在Java 中函数必须以接口实现的类实例来传递,在Rust 中可以通过传递特性参数来实现: fn output(object: impl Descriptive) { println!("{}", object.describe()); }.
確定! 回上一頁