未验证 提交 5747d1e0 编写于 作者: D Dylan DPC 提交者: GitHub

Rollup merge of #71767 - tshepang:stack-stuff, r=jonas-schievink

doc: make Stack and StackElement a little pretty

Also, fix rustdoc warnings.
......@@ -1417,16 +1417,18 @@ enum ParserState {
/// A Stack represents the current position of the parser in the logical
/// structure of the JSON stream.
/// For example foo.bar[3].x
///
/// An example is `foo.bar[3].x`.
pub struct Stack {
stack: Vec<InternalStackElement>,
str_buffer: Vec<u8>,
}
/// StackElements compose a Stack.
/// For example, StackElement::Key("foo"), StackElement::Key("bar"),
/// StackElement::Index(3) and StackElement::Key("x") are the
/// StackElements compositing the stack that represents foo.bar[3].x
///
/// As an example, `StackElement::Key("foo")`, `StackElement::Key("bar")`,
/// `StackElement::Index(3)`, and `StackElement::Key("x")` are the
/// StackElements composing the stack that represents `foo.bar[3].x`.
#[derive(PartialEq, Clone, Debug)]
pub enum StackElement<'l> {
Index(u32),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册