pub struct Fuse {
pub file: PathBuf,
pub line: usize,
pub tag: String,
pub date: NaiveDate,
pub owner: Option<String>,
pub message: String,
pub status: Status,
pub blamed_owner: Option<String>,
}Expand description
A single timebomb fuse found in a source file.
Fields§
§file: PathBufPath to the file containing the fuse (relative to scan root).
line: usize1-based line number within the file.
tag: StringThe tag keyword, e.g. “TODO”, “FIXME”, “HACK”.
date: NaiveDateThe expiry date parsed from the fuse.
owner: Option<String>Optional owner extracted from the second bracket group, e.g. [alice].
message: StringThe descriptive message after the colon.
status: StatusComputed status relative to the “today” date used during scanning.
blamed_owner: Option<String>Owner inferred from git blame when no explicit [owner] bracket is present.
Populated only when --blame is passed; None otherwise.
Implementations§
Source§impl Fuse
impl Fuse
Sourcepub fn days_from_today(&self, today: NaiveDate) -> i64
pub fn days_from_today(&self, today: NaiveDate) -> i64
Compute the number of days until (or since) expiry relative to today.
Positive means days remaining; negative means days overdue.
Sourcepub fn is_detonated(&self) -> bool
pub fn is_detonated(&self) -> bool
Returns true if this fuse has already detonated.
Sourcepub fn is_ticking(&self) -> bool
pub fn is_ticking(&self) -> bool
Returns true if this fuse is in the ticking window.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Fuse
impl<'de> Deserialize<'de> for Fuse
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>,
Auto Trait Implementations§
impl Freeze for Fuse
impl RefUnwindSafe for Fuse
impl Send for Fuse
impl Sync for Fuse
impl Unpin for Fuse
impl UnsafeUnpin for Fuse
impl UnwindSafe for Fuse
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
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>
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>
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