1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! One element of the key path a JSON edit follows.
//!
//! # Responsibilities
//!
//! - [`PathElem`]: a path element as the caller read it, a key or the type word of a non-string.
//!
//! # Non-responsibilities
//!
//! Refusing a non-string element, and the order in which that refusal is checked, belong to the
//! code that edits the document.
use crateLuaType;
/// One element of a key path: a string key, or the type of an element that is not a string.
///
/// # Examples
///
/// ```
/// use agentstacks::types::json::PathElem;
/// use agentstacks::types::op::LuaType;
///
/// let path = [
/// PathElem::Key("hooks".to_owned()),
/// PathElem::NotString(LuaType::Number),
/// ];
/// assert_eq!(path.len(), 2);
/// ```