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 for_class(class: ChildClass) -> Self
pub fn for_class(class: ChildClass) -> Self
The terms a step of class runs under: the class’s bound (or the variable’s) and the class’s grace before
the first notice, the notice interval of the environment, notices on standard error.
The grace never exceeds the interval, so a short interval still announces a wait quickly, nor half the bound,
so a bound set below the class’s grace still gets a notice before the step is stopped.
Sourcepub fn from_environment() -> Self
pub fn from_environment() -> Self
The terms of a step that reads objects through a long-lived reader: those of an object-writing step, the longer class, because one request can name a large blob.
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
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> ⓘ
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> ⓘ
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