Gets index of this within its [class@Sidebar].
If this is within a section, but that section is not in a sidebar, index will be within the section only.
If this is not within a section, the index will be 0.
The item can later be retrieved by passing this index into [method@Sidebar.get_item].
| this |
a sidebar item |
|
the index of this |