pub struct FormattedPriorityItem {
pub rank: usize,
pub score: f64,
pub severity: Severity,
pub sections: Vec<FormattedSection>,
}Expand description
Pure data structure representing a formatted priority item.
Contains all data needed to render a technical debt item to any output format. This is a pure data structure with no I/O operations.
Fields§
§rank: usize§score: f64§severity: Severity§sections: Vec<FormattedSection>Implementations§
Source§impl FormattedPriorityItem
impl FormattedPriorityItem
Sourcepub fn new(rank: usize, score: f64, severity: Severity) -> Self
pub fn new(rank: usize, score: f64, severity: Severity) -> Self
Creates a new formatted priority item with the given rank, score, and severity.
Sourcepub fn with_section(self, section: FormattedSection) -> Self
pub fn with_section(self, section: FormattedSection) -> Self
Adds a section to this formatted item.
Sourcepub fn with_sections(self, sections: Vec<FormattedSection>) -> Self
pub fn with_sections(self, sections: Vec<FormattedSection>) -> Self
Adds multiple sections to this formatted item.
Trait Implementations§
Source§impl Clone for FormattedPriorityItem
impl Clone for FormattedPriorityItem
Source§fn clone(&self) -> FormattedPriorityItem
fn clone(&self) -> FormattedPriorityItem
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 FormattedPriorityItem
impl Debug for FormattedPriorityItem
Source§impl PartialEq for FormattedPriorityItem
impl PartialEq for FormattedPriorityItem
impl StructuralPartialEq for FormattedPriorityItem
Auto Trait Implementations§
impl Freeze for FormattedPriorityItem
impl RefUnwindSafe for FormattedPriorityItem
impl Send for FormattedPriorityItem
impl Sync for FormattedPriorityItem
impl Unpin for FormattedPriorityItem
impl UnwindSafe for FormattedPriorityItem
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