pub struct DocumentOutline {
pub symbols: Vec<DocumentSymbol>,
}Expand description
A document outline (top-level symbol list).
Fields§
§symbols: Vec<DocumentSymbol>Top-level symbols.
Implementations§
Source§impl DocumentOutline
impl DocumentOutline
Sourcepub fn new(symbols: Vec<DocumentSymbol>) -> Self
pub fn new(symbols: Vec<DocumentSymbol>) -> Self
Create a new outline.
Sourcepub fn top_level_count(&self) -> usize
pub fn top_level_count(&self) -> usize
Return the top-level symbol count.
Sourcepub fn flatten_preorder(&self) -> Vec<&DocumentSymbol>
pub fn flatten_preorder(&self) -> Vec<&DocumentSymbol>
Flatten all symbols in pre-order.
Sourcepub fn find_by_name(&self, name: &str) -> Vec<&DocumentSymbol>
pub fn find_by_name(&self, name: &str) -> Vec<&DocumentSymbol>
Find all symbols with the given name (pre-order).
Trait Implementations§
Source§impl Clone for DocumentOutline
impl Clone for DocumentOutline
Source§fn clone(&self) -> DocumentOutline
fn clone(&self) -> DocumentOutline
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 DocumentOutline
impl Debug for DocumentOutline
Source§impl Default for DocumentOutline
impl Default for DocumentOutline
Source§fn default() -> DocumentOutline
fn default() -> DocumentOutline
Returns the “default value” for a type. Read more
Source§impl PartialEq for DocumentOutline
impl PartialEq for DocumentOutline
impl Eq for DocumentOutline
impl StructuralPartialEq for DocumentOutline
Auto Trait Implementations§
impl Freeze for DocumentOutline
impl RefUnwindSafe for DocumentOutline
impl Send for DocumentOutline
impl Sync for DocumentOutline
impl Unpin for DocumentOutline
impl UnsafeUnpin for DocumentOutline
impl UnwindSafe for DocumentOutline
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