Skip to main content

Crate serde_nt

Crate serde_nt 

Source
Expand description

基于 nt_syntax 的 NestedText serde 序列化 / 反序列化。

NestedText 的叶子只有字符串;数字、布尔、枚举按字符串表示解析与输出。

ⓘ
let conf: Conf = serde_nt::from_str(text)?;
let text = serde_nt::to_string(&conf)?;

Enums§

Error
serde_nt 错误

Functions§

dumps
把值树写成 NestedText 文本(末尾换行)
from_str
解析 NestedText 文本到任意 Deserialize<'de> 类型(单遍流式零中间树)
from_value
从已解析的值树反序列化
to_string
序列化为 NestedText 文本(流式单缓冲直写,零中间 Value 分配)
to_value
序列化为拥有所有权的 Value<'static>

Type Aliases§

Result