pub struct Definition {
pub name: String,
pub kind: DefinitionKind,
pub start_line: u32,
pub end_line: u32,
pub parent_name: Option<String>,
}Expand description
One definition found in a source file.
Fields§
§name: StringSymbol name as it appears in the AST. For methods this is the
bare name; the parent scope is captured separately so callers
can build a qualified Parent::method form when they want one.
kind: DefinitionKind§start_line: u321-indexed start line, inclusive.
end_line: u321-indexed end line, inclusive.
parent_name: Option<String>Surrounding scope name (impl block, class, namespace, …).
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
Source§impl PartialEq for Definition
impl PartialEq for Definition
Source§fn eq(&self, other: &Definition) -> bool
fn eq(&self, other: &Definition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq 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