Struct jortestkit::measurement::Thresholds
source · pub struct Thresholds<T> {
inner_thresholds: Vec<(Status, T)>,
max: T,
}
Fields§
§inner_thresholds: Vec<(Status, T)>
§max: T
Implementations§
source§impl<T: PartialOrd + Clone> Thresholds<T>
impl<T: PartialOrd + Clone> Thresholds<T>
pub fn new(green: T, yellow: T, red: T, max: T) -> Self
pub fn thresholds(&self) -> &Vec<(Status, T)>
pub fn max(&self) -> T
pub fn green_threshold(&self) -> T
pub fn yellow_threshold(&self) -> T
pub fn red_threshold(&self) -> T
source§impl Thresholds<Endurance>
impl Thresholds<Endurance>
pub fn new_endurance(duration: Duration) -> Thresholds<Endurance>
source§impl Thresholds<Speed>
impl Thresholds<Speed>
pub fn new_speed(duration: Duration) -> Thresholds<Speed>
source§impl Thresholds<Efficiency>
impl Thresholds<Efficiency>
pub fn new_efficiency(target: u32) -> Thresholds<Efficiency>
source§impl Thresholds<Consumption>
impl Thresholds<Consumption>
pub fn new_consumption( resources_usage: ResourcesUsage ) -> Thresholds<Consumption>
Trait Implementations§
source§impl<T: Clone> Clone for Thresholds<T>
impl<T: Clone> Clone for Thresholds<T>
source§fn clone(&self) -> Thresholds<T>
fn clone(&self) -> Thresholds<T>
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<T: Debug> Debug for Thresholds<T>
impl<T: Debug> Debug for Thresholds<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Thresholds<T>where T: RefUnwindSafe,
impl<T> Send for Thresholds<T>where T: Send,
impl<T> Sync for Thresholds<T>where T: Sync,
impl<T> Unpin for Thresholds<T>where T: Unpin,
impl<T> UnwindSafe for Thresholds<T>where T: UnwindSafe,
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