Struct jormungandr_automation::testing::Thresholds
pub struct Thresholds<T> {
inner_thresholds: Vec<(Status, T), Global>,
max: T,
}
Fields§
§inner_thresholds: Vec<(Status, T), Global>
§max: T
Implementations§
§impl<T> Thresholds<T>where
T: PartialOrd<T> + Clone,
impl<T> Thresholds<T>where T: PartialOrd<T> + Clone,
pub fn new(green: T, yellow: T, red: T, max: T) -> Thresholds<T>
pub fn thresholds(&self) -> &Vec<(Status, T), Global>
pub fn max(&self) -> T
pub fn green_threshold(&self) -> T
pub fn yellow_threshold(&self) -> T
pub fn red_threshold(&self) -> T
§impl Thresholds<Endurance>
impl Thresholds<Endurance>
pub fn new_endurance(duration: Duration) -> Thresholds<Endurance>
§impl Thresholds<Speed>
impl Thresholds<Speed>
pub fn new_speed(duration: Duration) -> Thresholds<Speed>
§impl Thresholds<Efficiency>
impl Thresholds<Efficiency>
pub fn new_efficiency(target: u32) -> Thresholds<Efficiency>
§impl Thresholds<Consumption>
impl Thresholds<Consumption>
pub fn new_consumption( resources_usage: ResourcesUsage ) -> Thresholds<Consumption>
Trait Implementations§
§impl<T> Clone for Thresholds<T>where
T: Clone,
impl<T> Clone for Thresholds<T>where T: Clone,
§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 more§impl<T> Debug for Thresholds<T>where
T: Debug,
impl<T> Debug for Thresholds<T>where T: Debug,
§impl<T> Display for Thresholds<T>where
T: Display + Clone + Debug + PartialOrd<T>,
impl<T> Display for Thresholds<T>where T: Display + Clone + Debug + PartialOrd<T>,
source§impl From<SyncWaitParams> for Thresholds<Speed>
impl From<SyncWaitParams> for Thresholds<Speed>
source§fn from(params: SyncWaitParams) -> Thresholds<Speed>
fn from(params: SyncWaitParams) -> Thresholds<Speed>
Converts to this type from the input type.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request