#[non_exhaustive]pub struct Context {
pub runner: Arc<dyn ProcessRunner>,
pub host: Host,
pub probe_timeout: Duration,
}Expand description
What machine setup runs its tools on and reads.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.runner: Arc<dyn ProcessRunner>Every tool runs through it: SystemProcesses, or a fake in tests.
host: HostThe computer it works on: Host::here, or a hand-built one.
probe_timeout: DurationHow long a probe may take (PROBE_TIMEOUT unless set).
Implementations§
Source§impl Context
impl Context
Sourcepub fn new(runner: Arc<dyn ProcessRunner>, host: Host) -> Context
pub fn new(runner: Arc<dyn ProcessRunner>, host: Host) -> Context
Machine setup on host, its tools run by runner.
Sourcepub async fn here(runner: Arc<dyn ProcessRunner>) -> Context
pub async fn here(runner: Arc<dyn ProcessRunner>) -> Context
Machine setup on this computer (Host::here), its tools run by runner.
Sourcepub fn with_probe_timeout(self, limit: Duration) -> Context
pub fn with_probe_timeout(self, limit: Duration) -> Context
The same, a probe given limit to answer.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
impl Forget for Context
impl Freeze for Contextwhere
*const ArcInner<dyn ProcessRunner> is !null: Freeze,
PhantomData<ArcInner<dyn ProcessRunner>>: Freeze,
&'static str: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<PathBuf>: Freeze,
impl Move for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Contextwhere
*const ArcInner<dyn ProcessRunner> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ProcessRunner>>: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<PathBuf>: UnsafeUnpin,
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