pub struct DocumentSymbol {
pub name: String,
pub detail: Option<String>,
pub kind: SymbolKind,
pub range: SymbolRange,
pub selection_range: SymbolRange,
pub children: Vec<DocumentSymbol>,
pub data_json: Option<String>,
}Expand description
A single document symbol node (hierarchical).
Fields§
§name: StringSymbol name (e.g. function name).
detail: Option<String>Optional detail string (e.g. type signature).
kind: SymbolKindSymbol kind.
range: SymbolRangeFull symbol span (character offsets).
selection_range: SymbolRangeSelection span (character offsets).
children: Vec<DocumentSymbol>Child symbols.
data_json: Option<String>Optional raw integration payload, encoded as JSON text.
Implementations§
Source§impl DocumentSymbol
impl DocumentSymbol
Sourcepub fn flatten_preorder<'a>(&'a self, out: &mut Vec<&'a DocumentSymbol>)
pub fn flatten_preorder<'a>(&'a self, out: &mut Vec<&'a DocumentSymbol>)
Collect this node and all descendants in pre-order.
Sourcepub fn find_by_name<'a>(&'a self, name: &str, out: &mut Vec<&'a DocumentSymbol>)
pub fn find_by_name<'a>(&'a self, name: &str, out: &mut Vec<&'a DocumentSymbol>)
Find all symbols with the given name (pre-order).
Trait Implementations§
Source§impl Clone for DocumentSymbol
impl Clone for DocumentSymbol
Source§fn clone(&self) -> DocumentSymbol
fn clone(&self) -> DocumentSymbol
Returns a duplicate of the value. Read more
1.0.0 · 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 DocumentSymbol
impl Debug for DocumentSymbol
Source§impl PartialEq for DocumentSymbol
impl PartialEq for DocumentSymbol
impl Eq for DocumentSymbol
impl StructuralPartialEq for DocumentSymbol
Auto Trait Implementations§
impl Freeze for DocumentSymbol
impl RefUnwindSafe for DocumentSymbol
impl Send for DocumentSymbol
impl Sync for DocumentSymbol
impl Unpin for DocumentSymbol
impl UnsafeUnpin for DocumentSymbol
impl UnwindSafe for DocumentSymbol
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