pub struct WatchTerms {
pub limit: Duration,
pub cadence: Cadence,
pub notices: Box<dyn Write + Send>,
}Expand description
What: When a watched wait prints and where it stops the child. Why: The production entry reads these from the environment and writes to standard error; tests choose short ones and read the notices from a buffer.
In TS you’d write (pseudocode):
type WatchTerms = { limitMs: number; cadence: Cadence; notices: Writable };Fields§
§limit: DurationHow long one wait may last before the child is stopped.
cadence: CadenceWhen the notices of a wait are due.
notices: Box<dyn Write + Send>Where the notices go.
Implementations§
Source§impl WatchTerms
impl WatchTerms
Sourcepub fn from_environment() -> Self
pub fn from_environment() -> Self
The terms this process runs under: the variables of its environment, notices on standard error.
Auto Trait Implementations§
impl !RefUnwindSafe for WatchTerms
impl !Sync for WatchTerms
impl !UnwindSafe for WatchTerms
impl Freeze for WatchTerms
impl Send for WatchTerms
impl Unpin for WatchTerms
impl UnsafeUnpin for WatchTerms
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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