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