pub struct TimeThreshold {
pub warn: Duration,
pub critical: Duration,
}
๐ฌThis is a nightly-only experimental API. (
test
)Expand description
Structure denoting time limits for test execution.
Fieldsยง
ยงwarn: Duration
๐ฌThis is a nightly-only experimental API. (
ยงtest
)critical: Duration
๐ฌThis is a nightly-only experimental API. (
test
)Implementationsยง
Sourceยงimpl TimeThreshold
impl TimeThreshold
Sourcepub fn new(warn: Duration, critical: Duration) -> Self
๐ฌThis is a nightly-only experimental API. (test
)
pub fn new(warn: Duration, critical: Duration) -> Self
test
)Creates a new TimeThreshold
instance with provided durations.
Sourcepub fn from_env_var(env_var_name: &str) -> Option<Self>
๐ฌThis is a nightly-only experimental API. (test
)
pub fn from_env_var(env_var_name: &str) -> Option<Self>
test
)Attempts to create a TimeThreshold
instance with values obtained
from the environment variable, and returns None
if the variable
is not set.
Environment variable format is expected to match \d+,\d+
.
ยงPanics
Panics if variable with provided name is set but contains inappropriate value.
Trait Implementationsยง
Sourceยงimpl Clone for TimeThreshold
impl Clone for TimeThreshold
Sourceยงfn clone(&self) -> TimeThreshold
fn clone(&self) -> TimeThreshold
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 Debug for TimeThreshold
impl Debug for TimeThreshold
Sourceยงimpl Default for TimeThreshold
impl Default for TimeThreshold
Sourceยงfn default() -> TimeThreshold
fn default() -> TimeThreshold
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl Eq for TimeThreshold
impl Eq for TimeThreshold
#[doc(hidden)] fn assert_receiver_is_total_eq(&self)
Sourceยงimpl PartialEq for TimeThreshold
impl PartialEq for TimeThreshold
impl Copy for TimeThreshold
impl StructuralPartialEq for TimeThreshold
Auto Trait Implementationsยง
impl Freeze for TimeThreshold
impl RefUnwindSafe for TimeThreshold
impl Send for TimeThreshold
impl Sync for TimeThreshold
impl Unpin for TimeThreshold
impl UnwindSafe for TimeThreshold
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> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Sourceยง#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
๐ฌThis is a nightly-only experimental API. (
sized_type_properties
)Sourceยง#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
๐ฌThis is a nightly-only experimental API. (
sized_type_properties
)Sourceยง#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
๐ฌThis is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more