pub struct StructureItem {
pub name: String,
pub detail: Option<String>,
pub role: UniversalElementRole,
pub range: Range<usize>,
pub selection_range: Range<usize>,
pub deprecated: bool,
pub children: Vec<StructureItem>,
}Expand description
Represents an item in the document structure (e.g., in an outline or breadcrumbs).
Fields§
§name: StringThe name of this item (e.g., function name, class name).
detail: Option<String>More detail about this item (e.g., function signature, type).
role: UniversalElementRoleThe universal role of this element.
range: Range<usize>The range of the entire element in the source code.
selection_range: Range<usize>The range that should be selected when clicking on this item. Usually the range of the identifier.
deprecated: boolWhether this item is deprecated.
children: Vec<StructureItem>Nested structure items (e.g., methods within a class).
Trait Implementations§
Source§impl Clone for StructureItem
impl Clone for StructureItem
Source§fn clone(&self) -> StructureItem
fn clone(&self) -> StructureItem
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 StructureItem
impl Debug for StructureItem
Source§impl<'de> Deserialize<'de> for StructureItem
impl<'de> Deserialize<'de> for StructureItem
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StructureItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StructureItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for StructureItem
impl Serialize for StructureItem
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for StructureItem
impl RefUnwindSafe for StructureItem
impl Send for StructureItem
impl Sync for StructureItem
impl Unpin for StructureItem
impl UnwindSafe for StructureItem
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