pub struct SourceFunction {
pub name: String,
pub signature: String,
pub body: String,
pub line: u32,
pub end_line: u32,
}Expand description
One Rust function discovered in a source file. 在源码文件中发现的一个 Rust 函数。
Fields§
§name: StringFunction name as written after the fn token.
fn token 之后书写的函数名。
signature: StringSource text from the start of the line through the opening brace, trimmed. 从行首到左花括号的源码文本,已去除首尾空白。
body: StringSource text between the opening and closing braces. 左、右花括号之间的源码文本。
line: u321-based line of the opening fn token.
以 1 起始的 fn 起始行行号。
end_line: u321-based line of the closing brace. 以 1 起始的右花括号所在行行号。
Trait Implementations§
Source§impl Clone for SourceFunction
impl Clone for SourceFunction
Source§fn clone(&self) -> SourceFunction
fn clone(&self) -> SourceFunction
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 SourceFunction
impl Debug for SourceFunction
impl Eq for SourceFunction
Source§impl PartialEq for SourceFunction
impl PartialEq for SourceFunction
impl StructuralPartialEq for SourceFunction
Auto Trait Implementations§
impl Freeze for SourceFunction
impl RefUnwindSafe for SourceFunction
impl Send for SourceFunction
impl Sync for SourceFunction
impl Unpin for SourceFunction
impl UnsafeUnpin for SourceFunction
impl UnwindSafe for SourceFunction
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