pub struct FunctionNode {
pub start_byte: usize,
pub end_byte: usize,
pub start_line: usize,
pub end_line: usize,
pub body: String,
pub name: Option<String>,
}Expand description
Represents a parsed function node from source code
Fields§
§start_byte: usizeStarting byte offset in the source file
end_byte: usizeEnding byte offset in the source file
start_line: usizeStarting line number (1-indexed)
end_line: usizeEnding line number (1-indexed)
body: StringThe function body as a string
name: Option<String>Optional function name (if captured by query)
Implementations§
Source§impl FunctionNode
impl FunctionNode
Sourcepub fn new(
start_byte: usize,
end_byte: usize,
start_line: usize,
end_line: usize,
body: String,
) -> Self
pub fn new( start_byte: usize, end_byte: usize, start_line: usize, end_line: usize, body: String, ) -> Self
Creates a new FunctionNode
Trait Implementations§
Source§impl Clone for FunctionNode
impl Clone for FunctionNode
Source§fn clone(&self) -> FunctionNode
fn clone(&self) -> FunctionNode
Returns a duplicate of the value. Read more
1.0.0 · 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 FunctionNode
impl Debug for FunctionNode
Source§impl<'de> Deserialize<'de> for FunctionNode
impl<'de> Deserialize<'de> for FunctionNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FunctionNode
impl PartialEq for FunctionNode
Source§impl Serialize for FunctionNode
impl Serialize for FunctionNode
impl Eq for FunctionNode
impl StructuralPartialEq for FunctionNode
Auto Trait Implementations§
impl Freeze for FunctionNode
impl RefUnwindSafe for FunctionNode
impl Send for FunctionNode
impl Sync for FunctionNode
impl Unpin for FunctionNode
impl UnwindSafe for FunctionNode
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more