#[non_exhaustive]pub struct EditorSemanticSymbol {
pub name: String,
pub detail: Option<String>,
pub kind: EditorSemanticKind,
pub role: EditorSemanticRole,
pub rename_policy: EditorRenamePolicy,
pub span: SourceSpan,
pub selection: SourceSpan,
}Expand description
A parser-produced symbol occurrence.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: String§detail: Option<String>§kind: EditorSemanticKind§role: EditorSemanticRole§rename_policy: EditorRenamePolicy§span: SourceSpan§selection: SourceSpanImplementations§
Source§impl EditorSemanticSymbol
impl EditorSemanticSymbol
pub fn new( name: impl Into<String>, detail: Option<String>, kind: EditorSemanticKind, span: SourceSpan, selection: SourceSpan, ) -> Self
pub fn outline( name: impl Into<String>, detail: Option<String>, kind: EditorSemanticKind, span: SourceSpan, selection: SourceSpan, ) -> Self
pub fn class_definition( name: impl Into<String>, detail: Option<String>, kind: EditorSemanticKind, span: SourceSpan, selection: SourceSpan, ) -> Self
pub fn reference( name: impl Into<String>, detail: Option<String>, kind: EditorSemanticKind, span: SourceSpan, selection: SourceSpan, ) -> Self
pub fn payload( name: impl Into<String>, detail: Option<String>, kind: EditorSemanticKind, span: SourceSpan, selection: SourceSpan, ) -> Self
pub fn with_role( name: impl Into<String>, detail: Option<String>, kind: EditorSemanticKind, role: EditorSemanticRole, span: SourceSpan, selection: SourceSpan, ) -> Self
pub fn with_rename_policy(self, rename_policy: EditorRenamePolicy) -> Self
Trait Implementations§
Source§impl Clone for EditorSemanticSymbol
impl Clone for EditorSemanticSymbol
Source§impl Debug for EditorSemanticSymbol
impl Debug for EditorSemanticSymbol
impl Eq for EditorSemanticSymbol
Source§impl PartialEq for EditorSemanticSymbol
impl PartialEq for EditorSemanticSymbol
impl StructuralPartialEq for EditorSemanticSymbol
Auto Trait Implementations§
impl Freeze for EditorSemanticSymbol
impl RefUnwindSafe for EditorSemanticSymbol
impl Send for EditorSemanticSymbol
impl Sync for EditorSemanticSymbol
impl Unpin for EditorSemanticSymbol
impl UnsafeUnpin for EditorSemanticSymbol
impl UnwindSafe for EditorSemanticSymbol
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.