在Rust中实现了 Default trait 则为类型设定了默认值。有时默认值还是挺有用的。下面看一下定义: trait Default { fn default() -> Self; } 复制代码.
確定! 回上一頁