pub struct PythonFunction { /* private fields */ }Expand description
A python function
Trait Implementations§
Source§impl Clone for PythonFunction
impl Clone for PythonFunction
Source§fn clone(&self) -> PythonFunction
fn clone(&self) -> PythonFunction
Returns a copy 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 PythonFunction
impl Debug for PythonFunction
Source§impl Display for PythonFunction
impl Display for PythonFunction
Source§impl FunctionTrait for PythonFunction
impl FunctionTrait for PythonFunction
Source§fn get_tops(&self) -> Vec<(String, usize)>
fn get_tops(&self) -> Vec<(String, usize)>
returns the tops like any the heading of classes/impls (among others) the function is part of along with the starting line of each heading
for example it could return
[("impl Test {", 3)]
to get just for example the headings use the map method function.get_tops().map(|top| top.0)Source§fn get_bottoms(&self) -> Vec<(String, usize)>
fn get_bottoms(&self) -> Vec<(String, usize)>
same as
get_tops just retrieves the bottoms like so [("}", 22)]Source§fn get_total_lines(&self) -> (usize, usize)
fn get_total_lines(&self) -> (usize, usize)
returns the starting and ending line of the the function including any class/impls (among others) the function is part of
Auto Trait Implementations§
impl Freeze for PythonFunction
impl RefUnwindSafe for PythonFunction
impl Send for PythonFunction
impl Sync for PythonFunction
impl Unpin for PythonFunction
impl UnwindSafe for PythonFunction
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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