pub struct FunctionSpan {
pub name: String,
pub line: usize,
pub last: usize,
}Expand description
A named function of a .tl file, for coverage (see Htl::coverage_spans).
The body is line + 1 ..= last - 1, strictly between the two: defining a function
runs both ends of it, so neither says whether the function was ever entered. A
never-called function m.f() spanning lines 12..15 comes back from the line hook
with 12 and 15 executed and 13, 14 not. Functions with nothing in between (one
line, or an empty body) have no such span and are not reported at all.
Fields§
§name: StringAs the source writes it: f, M.f, M:f.
line: usizeThe line the function is declared on.
last: usizeThe line its end is on. Always at least line + 2.
Trait Implementations§
Source§impl Clone for FunctionSpan
impl Clone for FunctionSpan
Source§fn clone(&self) -> FunctionSpan
fn clone(&self) -> FunctionSpan
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 moreAuto Trait Implementations§
impl Freeze for FunctionSpan
impl RefUnwindSafe for FunctionSpan
impl Send for FunctionSpan
impl Sync for FunctionSpan
impl Unpin for FunctionSpan
impl UnsafeUnpin for FunctionSpan
impl UnwindSafe for FunctionSpan
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> 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