pub struct Definition {
pub path: String,
pub language: Language,
pub kind: DefKind,
pub name: String,
pub scope: Option<String>,
pub line: u32,
pub start_line: u32,
pub end_line: u32,
pub snippet: String,
}Expand description
One definition in the tree. Line numbers are 1-based and start_line..=end_line is
inclusive; line is the line that names the symbol and always lies inside the range.
Fields§
§path: StringRoot-relative, forward slashes on every platform.
language: Language§kind: DefKind§name: String§scope: Option<String>The enclosing named thing, when there is one: the impl target or class of a
method, the table of a TOML key, the dotted parent path of a YAML/JSON key.
line: u32§start_line: u32§end_line: u32§snippet: StringThe defining line, trimmed, at most [SNIPPET_CHARS] characters.
Trait Implementations§
Source§impl Clone for Definition
impl Clone for Definition
Source§fn clone(&self) -> Definition
fn clone(&self) -> Definition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Definition
impl Debug for Definition
impl Eq for Definition
Source§impl PartialEq for Definition
impl PartialEq for Definition
impl StructuralPartialEq for Definition
Auto Trait Implementations§
impl Freeze for Definition
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnsafeUnpin for Definition
impl UnwindSafe for Definition
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§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.