pub struct SemanticDocumentSymbol {
pub name: String,
pub kind: SymbolKind,
pub range: Range<usize>,
pub selection_range: Range<usize>,
pub detail: Option<String>,
pub source: SymbolSource,
}Expand description
Language-server/SCIP symbol payload before conversion to local symbol IR.
Ranges are unvalidated UTF-8 byte offsets. detail typically contains a
signature, while None means the backend supplied no detail.
§Examples
use ailloli_ui_editor::{code::SemanticDocumentSymbol, SymbolKind, SymbolSource};
let symbol = SemanticDocumentSymbol { name: "run".into(), kind: SymbolKind::Function, range: 0..8, selection_range: 3..6, detail: None, source: SymbolSource::Lsp };
assert_eq!(symbol.selection_range, 3..6);Fields§
§name: StringDisplay name, including an empty name if supplied by the backend.
kind: SymbolKindLanguage-neutral symbol category.
range: Range<usize>Half-open extent in document UTF-8 bytes.
selection_range: Range<usize>Half-open name/selection range in document UTF-8 bytes.
detail: Option<String>Optional backend detail copied into the local signature field.
source: SymbolSourceClaimed semantic source; conversion functions override this field.
Trait Implementations§
Source§impl Clone for SemanticDocumentSymbol
impl Clone for SemanticDocumentSymbol
Source§fn clone(&self) -> SemanticDocumentSymbol
fn clone(&self) -> SemanticDocumentSymbol
Returns a copy 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 SemanticDocumentSymbol
impl Debug for SemanticDocumentSymbol
Source§impl<'de> Deserialize<'de> for SemanticDocumentSymbol
impl<'de> Deserialize<'de> for SemanticDocumentSymbol
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SemanticDocumentSymbol
impl PartialEq for SemanticDocumentSymbol
Source§impl Serialize for SemanticDocumentSymbol
impl Serialize for SemanticDocumentSymbol
impl Eq for SemanticDocumentSymbol
impl StructuralPartialEq for SemanticDocumentSymbol
Auto Trait Implementations§
impl Freeze for SemanticDocumentSymbol
impl RefUnwindSafe for SemanticDocumentSymbol
impl Send for SemanticDocumentSymbol
impl Sync for SemanticDocumentSymbol
impl Unpin for SemanticDocumentSymbol
impl UnwindSafe for SemanticDocumentSymbol
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.