pub struct IndexedElement {
pub kind: ElementKind,
pub name: String,
pub field: Option<String>,
pub tree: Option<String>,
pub span: Span,
pub key_span: Option<Span>,
pub depth: usize,
pub path: PathKey,
}Expand description
One recorded element in the SpanIndex.
Fields§
§kind: ElementKind§name: String§field: Option<String>§tree: Option<String>§span: Span§key_span: Option<Span>For definitions: the span of the name token itself (used to anchor go-to-definition and to hit-test the identifier).
depth: usizeStructural depth in the document (used for find_span tie-breaking).
path: PathKeyThe index path of this element (not serialized).
Trait Implementations§
Source§impl Clone for IndexedElement
impl Clone for IndexedElement
Source§fn clone(&self) -> IndexedElement
fn clone(&self) -> IndexedElement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexedElement
impl Debug for IndexedElement
Auto Trait Implementations§
impl Freeze for IndexedElement
impl RefUnwindSafe for IndexedElement
impl Send for IndexedElement
impl Sync for IndexedElement
impl Unpin for IndexedElement
impl UnsafeUnpin for IndexedElement
impl UnwindSafe for IndexedElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more