pub struct FunctionDef {
pub name: String,
pub container: String,
pub signature: String,
pub start_line: usize,
pub end_line: usize,
pub content: String,
}Expand description
A function definition.
Fields§
§name: String§container: StringEnclosing impl / type / module / receiver, when the parser can see one. Empty for a file-scope function.
signature: String§start_line: usize§end_line: usize§content: StringImplementations§
Source§impl FunctionDef
impl FunctionDef
Sourcepub fn qualified_name(&self) -> String
pub fn qualified_name(&self) -> String
container::name, or the bare name when the parser saw no container.
Sourcepub fn symbol_identity(&self) -> String
pub fn symbol_identity(&self) -> String
Identity that distinguishes Foo::run from Bar::run and
overloads that share a bare name. Used as the capture-time
changed_symbols key.
Trait Implementations§
Source§impl Clone for FunctionDef
impl Clone for FunctionDef
Source§fn clone(&self) -> FunctionDef
fn clone(&self) -> FunctionDef
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 FunctionDef
impl Debug for FunctionDef
Source§impl PartialEq for FunctionDef
impl PartialEq for FunctionDef
impl StructuralPartialEq for FunctionDef
Auto Trait Implementations§
impl Freeze for FunctionDef
impl RefUnwindSafe for FunctionDef
impl Send for FunctionDef
impl Sync for FunctionDef
impl Unpin for FunctionDef
impl UnsafeUnpin for FunctionDef
impl UnwindSafe for FunctionDef
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