PathItem
This class represents an individual component within a path, used for navigating data structures. It supports string-based keys for mapping access and integer-based indices for retrieving items from lists, tuples, or dictionaries with integer keys.
Attributes
| Attribute | Type | Description |
|---|---|---|
| S | [PathItemString](pathitemstring.md?sid=lookup_key_pathitemstring) | Stores a PathItemString representing a string-based key or attribute name used for path navigation. |
| Pos | usize | Integer key used to get items from a list, tuple, or a dictionary with integer keys. |
| Neg | usize | Negative integer index used for reverse-order access to items in a sequence. |
Constructor
Signature
def S(
value: [PathItemString](pathitemstring.md?sid=lookup_key_pathitemstring)
) - > [PathItem](pathitem.md?sid=lookup_key_pathitem)
Parameters
| Name | Type | Description |
|---|---|---|
| value | [PathItemString](pathitemstring.md?sid=lookup_key_pathitemstring) | The string identifier used to locate a specific property or mapping entry. |
Signature
def Pos(
index: usize
) - > [PathItem](pathitem.md?sid=lookup_key_pathitem)
Parameters
| Name | Type | Description |
|---|---|---|
| index | usize | The zero-based positive index used to retrieve an item from a sequence or integer-keyed mapping. |
Signature
def Neg(
index: usize
) - > [PathItem](pathitem.md?sid=lookup_key_pathitem)
Parameters
| Name | Type | Description |
|---|---|---|
| index | usize | The absolute value of the negative index used to access elements from the end of a sequence. |