pub struct LexicalRustSymbolIndexer;Expand description
Deterministic line-oriented Rust fallback indexer.
It performs no parsing or I/O and recognizes only trimmed lines beginning
exactly with use , fn , struct , enum , or trait .
§Examples
use ailloli_ui_editor::{Document, DocumentId, EditorLanguage, LexicalRustSymbolIndexer, SymbolIndexer};
use ailloli_ui_text::TextBuffer;
let document = Document::new(DocumentId(1), TextBuffer::from_string("fn run() {}")) .with_language(EditorLanguage::Rust);
assert_eq!(LexicalRustSymbolIndexer.index_document(&document).symbols.len(), 1);Trait Implementations§
Source§impl Debug for LexicalRustSymbolIndexer
impl Debug for LexicalRustSymbolIndexer
Source§impl Default for LexicalRustSymbolIndexer
impl Default for LexicalRustSymbolIndexer
Source§fn default() -> LexicalRustSymbolIndexer
fn default() -> LexicalRustSymbolIndexer
Returns the “default value” for a type. Read more
Source§impl SymbolIndexer for LexicalRustSymbolIndexer
Delegates to the lexical Rust summarizer.
impl SymbolIndexer for LexicalRustSymbolIndexer
Delegates to the lexical Rust summarizer.
Source§fn index_document(&mut self, document: &Document) -> CodeFileSummary
fn index_document(&mut self, document: &Document) -> CodeFileSummary
Returns summarize_rust_lexical without failure.
Auto Trait Implementations§
impl Freeze for LexicalRustSymbolIndexer
impl RefUnwindSafe for LexicalRustSymbolIndexer
impl Send for LexicalRustSymbolIndexer
impl Sync for LexicalRustSymbolIndexer
impl Unpin for LexicalRustSymbolIndexer
impl UnwindSafe for LexicalRustSymbolIndexer
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