pub trait ValueFormatter {
type Output;
// Required method
fn format_value(&self, value: &Value) -> Self::Output;
}Expand description
核心 trait:值格式化器
只需实现一个方法来格式化任意 Value。这是最核心、最简单的接口。
Required Associated Types§
Required Methods§
Sourcefn format_value(&self, value: &Value) -> Self::Output
fn format_value(&self, value: &Value) -> Self::Output
格式化任意值