pub trait ParentContext {
// Required methods
fn fork(&self) -> Context;
fn fork_with_deadline(&self, deadline: Instant) -> Context;
// Provided method
fn fork_with_timeout(&self, timeout: Duration) -> Context { ... }
}Expand description
Describes an object from which a child context can be created. Implemented for contexts and for slices of contexts.
Required Methods§
Sourcefn fork_with_deadline(&self, deadline: Instant) -> Context
fn fork_with_deadline(&self, deadline: Instant) -> Context
Forks a context. Equivalent to Self::fork(), except that the new
context has a deadline which is the earliest of those in self and
the one provided.
Provided Methods§
Sourcefn fork_with_timeout(&self, timeout: Duration) -> Context
fn fork_with_timeout(&self, timeout: Duration) -> Context
Forks a context. Equivalent to Self::fork_with_deadline(), except
that the deadline is calculated from the current time and the
provided timeout duration.