Trait conch_runtime::spawn::Spawn
[−]
[src]
pub trait Spawn<E: ?Sized> { type EnvFuture: EnvFuture<E, Item = Self::Future, Error = Self::Error>; type Future: Future<Item = ExitStatus, Error = Self::Error>; type Error; fn spawn(self, env: &E) -> Self::EnvFuture; }
A trait for spawning commands into an EnvFuture
which can be
polled to completion.
Spawning a command is separated into two distinct parts: a future that requires a mutable environment to make progress, and a future which no longer needs any context and can make progress on its own.
This distinction allows a caller to drop an environment as soon as it is no longer needed, which will free up resources, and especially important in preventing deadlocks between pipelines (since the parent process will contain extra reader/writer ends of a pipe and may prevent processes from exiting).
Associated Types
type EnvFuture: EnvFuture<E, Item = Self::Future, Error = Self::Error>
The future that represents spawning the command.
It represents all computations that may need an environment to progress further.
type Future: Future<Item = ExitStatus, Error = Self::Error>
The future that represents the exit status of a fully bootstrapped command, which no longer requires an environment to be driven to completion.
type Error
The type of error that a future will resolve with if it fails in a normal fashion.
Required Methods
fn spawn(self, env: &E) -> Self::EnvFuture
Spawn the command as a future.
Although the implementation is free to make any optimizations or
pre-computations, there should be no observable side-effects until the
very first call to poll
on the future. That way a constructed future
that was never poll
ed could be dropped without the risk of unintended
side effects.
Note: There are no guarantees that the environment will not change
between the spawn
invocation and the first call to poll()
on the
future. Thus any optimizations the implementation may decide to make
based on the environment should be done with care.
Implementations on Foreign Types
impl<T: ?Sized, E: ?Sized> Spawn<E> for Rc<T> where
T: 'static + SpawnBoxed<E>,
E: 'static,
[src]
T: 'static + SpawnBoxed<E>,
E: 'static,
impl<'b, T: ?Sized, E: ?Sized> Spawn<E> for &'b Rc<T> where
T: 'static + SpawnBoxed<E>,
E: 'static,
[src]
T: 'static + SpawnBoxed<E>,
E: 'static,
impl<T: ?Sized, E: ?Sized> Spawn<E> for Arc<T> where
T: 'static + SpawnBoxed<E>,
E: 'static,
[src]
T: 'static + SpawnBoxed<E>,
E: 'static,
impl<'b, T: ?Sized, E: ?Sized> Spawn<E> for &'b Arc<T> where
T: 'static + SpawnBoxed<E>,
E: 'static,
[src]
T: 'static + SpawnBoxed<E>,
E: 'static,
impl<E: ?Sized, T> Spawn<E> for AndOrList<T> where
E: LastStatusEnvironment + ReportErrorEnvironment,
T: Spawn<E>,
T::Error: IsFatalError,
[src]
E: LastStatusEnvironment + ReportErrorEnvironment,
T: Spawn<E>,
T::Error: IsFatalError,
impl<'a, E: ?Sized, T> Spawn<E> for &'a AndOrList<T> where
E: LastStatusEnvironment + ReportErrorEnvironment,
&'a T: Spawn<E>,
<&'a T as Spawn<E>>::Error: IsFatalError,
[src]
E: LastStatusEnvironment + ReportErrorEnvironment,
&'a T: Spawn<E>,
<&'a T as Spawn<E>>::Error: IsFatalError,
impl<E: ?Sized, T> Spawn<E> for Command<T> where
E: LastStatusEnvironment,
T: Spawn<E>,
T::Error: From<RuntimeError>,
[src]
E: LastStatusEnvironment,
T: Spawn<E>,
T::Error: From<RuntimeError>,
impl<'a, E: ?Sized, T> Spawn<E> for &'a Command<T> where
E: LastStatusEnvironment,
&'a T: Spawn<E>,
<&'a T as Spawn<E>>::Error: From<RuntimeError>,
[src]
E: LastStatusEnvironment,
&'a T: Spawn<E>,
<&'a T as Spawn<E>>::Error: From<RuntimeError>,
impl<S, R, E: ?Sized> Spawn<E> for CompoundCommand<S, R> where
R: RedirectEval<E, Handle = E::FileHandle>,
S: Spawn<E>,
S::Error: From<RedirectionError> + From<R::Error>,
E: AsyncIoEnvironment + FileDescEnvironment,
E::FileHandle: Clone + From<FileDesc>,
[src]
R: RedirectEval<E, Handle = E::FileHandle>,
S: Spawn<E>,
S::Error: From<RedirectionError> + From<R::Error>,
E: AsyncIoEnvironment + FileDescEnvironment,
E::FileHandle: Clone + From<FileDesc>,
impl<'a, S, R, E: ?Sized> Spawn<E> for &'a CompoundCommand<S, R> where
&'a R: RedirectEval<E, Handle = E::FileHandle>,
&'a S: Spawn<E>,
<&'a S as Spawn<E>>::Error: From<RedirectionError> + From<<&'a R as RedirectEval<E>>::Error>,
E: AsyncIoEnvironment + FileDescEnvironment,
E::FileHandle: Clone + From<FileDesc>,
[src]
&'a R: RedirectEval<E, Handle = E::FileHandle>,
&'a S: Spawn<E>,
<&'a S as Spawn<E>>::Error: From<RedirectionError> + From<<&'a R as RedirectEval<E>>::Error>,
E: AsyncIoEnvironment + FileDescEnvironment,
E::FileHandle: Clone + From<FileDesc>,
impl<T, W, S, E> Spawn<E> for CompoundCommandKind<T, W, S> where
W: WordEval<E>,
W::Error: IsFatalError,
W::EvalResult: Into<E::Var>,
S: 'static + Spawn<E> + SpawnBoxed<E, Error = <S as Spawn<E>>::Error>,
<S as Spawn<E>>::Error: From<W::Error> + IsFatalError,
E: 'static + ArgumentsEnvironment + LastStatusEnvironment + ReportErrorEnvironment + VariableEnvironment + SubEnvironment,
E::Var: From<E::Arg>,
E::VarName: Clone + From<T>,
[src]
W: WordEval<E>,
W::Error: IsFatalError,
W::EvalResult: Into<E::Var>,
S: 'static + Spawn<E> + SpawnBoxed<E, Error = <S as Spawn<E>>::Error>,
<S as Spawn<E>>::Error: From<W::Error> + IsFatalError,
E: 'static + ArgumentsEnvironment + LastStatusEnvironment + ReportErrorEnvironment + VariableEnvironment + SubEnvironment,
E::Var: From<E::Arg>,
E::VarName: Clone + From<T>,
type EnvFuture = CompoundCommandKindFuture<IntoIter<S>, IntoIter<W>, IntoIter<GuardBodyPair<IntoIter<S>>>, IntoIter<PatternBodyPair<IntoIter<W>, IntoIter<S>>>, Arc<S>, E>
type Future = ExitResult<Either<S::Future, BoxStatusFuture<'static, Self::Error>>>
type Error = <S as Spawn<E>>::Error
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<'a, T, W, S, E> Spawn<E> for &'a CompoundCommandKind<T, W, S> where
T: Clone,
&'a W: WordEval<E>,
<&'a W as WordEval<E>>::Error: IsFatalError,
<&'a W as WordEval<E>>::EvalResult: Into<E::Var>,
&'a S: Spawn<E>,
<&'a S as Spawn<E>>::Error: IsFatalError,
<&'a S as Spawn<E>>::Error: From<<&'a W as WordEval<E>>::Error> + IsFatalError,
E: ArgumentsEnvironment + LastStatusEnvironment + ReportErrorEnvironment + VariableEnvironment + SubEnvironment,
E::Var: From<E::Arg>,
E::VarName: Clone + From<T>,
[src]
T: Clone,
&'a W: WordEval<E>,
<&'a W as WordEval<E>>::Error: IsFatalError,
<&'a W as WordEval<E>>::EvalResult: Into<E::Var>,
&'a S: Spawn<E>,
<&'a S as Spawn<E>>::Error: IsFatalError,
<&'a S as Spawn<E>>::Error: From<<&'a W as WordEval<E>>::Error> + IsFatalError,
E: ArgumentsEnvironment + LastStatusEnvironment + ReportErrorEnvironment + VariableEnvironment + SubEnvironment,
E::Var: From<E::Arg>,
E::VarName: Clone + From<T>,
impl<S, E> Spawn<E> for ListableCommand<S> where
S: Spawn<E>,
S::Error: From<Error>,
E: FileDescEnvironment + SubEnvironment,
E::FileHandle: From<FileDesc> + Clone,
[src]
S: Spawn<E>,
S::Error: From<Error>,
E: FileDescEnvironment + SubEnvironment,
E::FileHandle: From<FileDesc> + Clone,
type EnvFuture = ListableCommand<S, E>
type Future = ExitResult<SpawnedPipeline<S, E>>
type Error = S::Error
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<'a, S: 'a, E> Spawn<E> for &'a ListableCommand<S> where
&'a S: Spawn<E>,
<&'a S as Spawn<E>>::Error: From<Error>,
E: FileDescEnvironment + SubEnvironment,
E::FileHandle: From<FileDesc> + Clone,
[src]
&'a S: Spawn<E>,
<&'a S as Spawn<E>>::Error: From<Error>,
E: FileDescEnvironment + SubEnvironment,
E::FileHandle: From<FileDesc> + Clone,
type EnvFuture = ListableCommand<&'a S, E>
type Future = ExitResult<SpawnedPipeline<&'a S, E>>
type Error = <&'a S as Spawn<E>>::Error
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<ERR, N, S, C, F, E: ?Sized> Spawn<E> for PipeableCommand<N, S, C, Rc<F>> where
S: Spawn<E, Error = ERR>,
C: Spawn<E, Error = ERR>,
F: 'static + SpawnBoxed<E, Error = ERR>,
E: FunctionEnvironment,
E::FnName: From<N>,
E::Fn: From<Rc<SpawnBoxed<E, Error = ERR> + 'static>>,
[src]
S: Spawn<E, Error = ERR>,
C: Spawn<E, Error = ERR>,
F: 'static + SpawnBoxed<E, Error = ERR>,
E: FunctionEnvironment,
E::FnName: From<N>,
E::Fn: From<Rc<SpawnBoxed<E, Error = ERR> + 'static>>,
impl<'a, ERR, N, S, C, F, E: ?Sized> Spawn<E> for &'a PipeableCommand<N, S, C, Rc<F>> where
N: Clone,
&'a S: Spawn<E, Error = ERR>,
&'a C: Spawn<E, Error = ERR>,
F: 'static + SpawnBoxed<E, Error = ERR>,
E: FunctionEnvironment,
E::FnName: From<N>,
E::Fn: From<Rc<SpawnBoxed<E, Error = ERR> + 'static>>,
[src]
N: Clone,
&'a S: Spawn<E, Error = ERR>,
&'a C: Spawn<E, Error = ERR>,
F: 'static + SpawnBoxed<E, Error = ERR>,
E: FunctionEnvironment,
E::FnName: From<N>,
E::Fn: From<Rc<SpawnBoxed<E, Error = ERR> + 'static>>,
impl<ERR, N, S, C, F, E: ?Sized> Spawn<E> for PipeableCommand<N, S, C, Arc<F>> where
S: Spawn<E, Error = ERR>,
C: Spawn<E, Error = ERR>,
F: 'static + SpawnBoxed<E, Error = ERR> + Send + Sync,
E: FunctionEnvironment,
E::FnName: From<N>,
E::Fn: From<Arc<SpawnBoxed<E, Error = ERR> + Send + Sync + 'static>>,
[src]
S: Spawn<E, Error = ERR>,
C: Spawn<E, Error = ERR>,
F: 'static + SpawnBoxed<E, Error = ERR> + Send + Sync,
E: FunctionEnvironment,
E::FnName: From<N>,
E::Fn: From<Arc<SpawnBoxed<E, Error = ERR> + Send + Sync + 'static>>,
impl<'a, ERR, N, S, C, F, E: ?Sized> Spawn<E> for &'a PipeableCommand<N, S, C, Arc<F>> where
N: Clone,
&'a S: Spawn<E, Error = ERR>,
&'a C: Spawn<E, Error = ERR>,
F: 'static + SpawnBoxed<E, Error = ERR> + Send + Sync,
E: FunctionEnvironment,
E::FnName: From<N>,
E::Fn: From<Arc<SpawnBoxed<E, Error = ERR> + Send + Sync + 'static>>,
[src]
N: Clone,
&'a S: Spawn<E, Error = ERR>,
&'a C: Spawn<E, Error = ERR>,
F: 'static + SpawnBoxed<E, Error = ERR> + Send + Sync,
E: FunctionEnvironment,
E::FnName: From<N>,
E::Fn: From<Arc<SpawnBoxed<E, Error = ERR> + Send + Sync + 'static>>,
type EnvFuture = PipeableCommand<N, <&'a S as Spawn<E>>::EnvFuture, <&'a C as Spawn<E>>::EnvFuture, Arc<SpawnBoxed<E, Error = ERR> + Send + Sync + 'static>>
type Future = ExitResult<Either<<&'a S as Spawn<E>>::Future, <&'a C as Spawn<E>>::Future>>
type Error = ERR
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<V, W, R, S, E: ?Sized> Spawn<E> for SimpleCommand<V, W, R> where
R: RedirectEval<E, Handle = E::FileHandle>,
R::Error: From<RedirectionError>,
V: Hash + Eq + Borrow<String>,
W: WordEval<E>,
S: Clone + Spawn<E>,
S::Error: From<CommandError> + From<RedirectionError> + From<R::Error> + From<W::Error>,
E: AsyncIoEnvironment + ExecutableEnvironment + ExportedVariableEnvironment + FileDescEnvironment + FunctionEnvironment<Fn = S> + SetArgumentsEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Arg: From<W::EvalResult>,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<W::EvalResult>,
E::VarName: Borrow<String> + Clone + From<V>,
E::Var: Borrow<String> + Clone + From<W::EvalResult>,
[src]
R: RedirectEval<E, Handle = E::FileHandle>,
R::Error: From<RedirectionError>,
V: Hash + Eq + Borrow<String>,
W: WordEval<E>,
S: Clone + Spawn<E>,
S::Error: From<CommandError> + From<RedirectionError> + From<R::Error> + From<W::Error>,
E: AsyncIoEnvironment + ExecutableEnvironment + ExportedVariableEnvironment + FileDescEnvironment + FunctionEnvironment<Fn = S> + SetArgumentsEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Arg: From<W::EvalResult>,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<W::EvalResult>,
E::VarName: Borrow<String> + Clone + From<V>,
E::Var: Borrow<String> + Clone + From<W::EvalResult>,
type EnvFuture = SimpleCommandEnvFuture<R, V, W, E>
type Future = ExitResult<SpawnedSimpleCommand<E::Future, S::Future>>
type Error = S::Error
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<'a, V, W, R, S, E: ?Sized> Spawn<E> for &'a SimpleCommand<V, W, R> where
&'a R: RedirectEval<E, Handle = E::FileHandle>,
<&'a R as RedirectEval<E>>::Error: From<RedirectionError>,
V: Hash + Eq + Borrow<String> + Clone,
&'a W: WordEval<E>,
S: Clone + Spawn<E>,
S::Error: From<CommandError> + From<RedirectionError> + From<<&'a R as RedirectEval<E>>::Error> + From<<&'a W as WordEval<E>>::Error>,
E: AsyncIoEnvironment + ExecutableEnvironment + ExportedVariableEnvironment + FileDescEnvironment + FunctionEnvironment<Fn = S> + SetArgumentsEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Arg: From<<&'a W as WordEval<E>>::EvalResult>,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<<&'a W as WordEval<E>>::EvalResult>,
E::VarName: Borrow<String> + Clone + From<V>,
E::Var: Borrow<String> + Clone + From<<&'a W as WordEval<E>>::EvalResult>,
[src]
&'a R: RedirectEval<E, Handle = E::FileHandle>,
<&'a R as RedirectEval<E>>::Error: From<RedirectionError>,
V: Hash + Eq + Borrow<String> + Clone,
&'a W: WordEval<E>,
S: Clone + Spawn<E>,
S::Error: From<CommandError> + From<RedirectionError> + From<<&'a R as RedirectEval<E>>::Error> + From<<&'a W as WordEval<E>>::Error>,
E: AsyncIoEnvironment + ExecutableEnvironment + ExportedVariableEnvironment + FileDescEnvironment + FunctionEnvironment<Fn = S> + SetArgumentsEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Arg: From<<&'a W as WordEval<E>>::EvalResult>,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<<&'a W as WordEval<E>>::EvalResult>,
E::VarName: Borrow<String> + Clone + From<V>,
E::Var: Borrow<String> + Clone + From<<&'a W as WordEval<E>>::EvalResult>,
type EnvFuture = SimpleCommandEnvFuture<&'a R, V, &'a W, E>
type Future = ExitResult<SpawnedSimpleCommand<E::Future, S::Future>>
type Error = S::Error
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<T, E: ?Sized> Spawn<E> for TopLevelCommand<T> where
T: 'static + StringWrapper + Display,
E: 'static + AsyncIoEnvironment + ArgumentsEnvironment<Arg = T> + ExecutableEnvironment + ExportedVariableEnvironment<VarName = T, Var = T> + FileDescEnvironment + FunctionEnvironment + IsInteractiveEnvironment + LastStatusEnvironment + ReportErrorEnvironment + SetArgumentsEnvironment + SubEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<T>,
E::Fn: Clone + From<Rc<SpawnBoxed<E, Error = RuntimeError> + 'static>> + Spawn<E, Error = RuntimeError>,
[src]
T: 'static + StringWrapper + Display,
E: 'static + AsyncIoEnvironment + ArgumentsEnvironment<Arg = T> + ExecutableEnvironment + ExportedVariableEnvironment<VarName = T, Var = T> + FileDescEnvironment + FunctionEnvironment + IsInteractiveEnvironment + LastStatusEnvironment + ReportErrorEnvironment + SetArgumentsEnvironment + SubEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<T>,
E::Fn: Clone + From<Rc<SpawnBoxed<E, Error = RuntimeError> + 'static>> + Spawn<E, Error = RuntimeError>,
type EnvFuture = BoxSpawnEnvFuture<'static, E, Self::Error>
type Future = BoxStatusFuture<'static, Self::Error>
type Error = RuntimeError
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<'a, T: 'a, E: ?Sized> Spawn<E> for &'a TopLevelCommand<T> where
T: 'static + StringWrapper + Display,
E: 'static + AsyncIoEnvironment + ArgumentsEnvironment<Arg = T> + ExecutableEnvironment + ExportedVariableEnvironment<VarName = T, Var = T> + FileDescEnvironment + FunctionEnvironment + IsInteractiveEnvironment + LastStatusEnvironment + ReportErrorEnvironment + SetArgumentsEnvironment + SubEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<T>,
E::Fn: Clone + From<Rc<SpawnBoxed<E, Error = RuntimeError> + 'static>> + Spawn<E, Error = RuntimeError>,
[src]
T: 'static + StringWrapper + Display,
E: 'static + AsyncIoEnvironment + ArgumentsEnvironment<Arg = T> + ExecutableEnvironment + ExportedVariableEnvironment<VarName = T, Var = T> + FileDescEnvironment + FunctionEnvironment + IsInteractiveEnvironment + LastStatusEnvironment + ReportErrorEnvironment + SetArgumentsEnvironment + SubEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<T>,
E::Fn: Clone + From<Rc<SpawnBoxed<E, Error = RuntimeError> + 'static>> + Spawn<E, Error = RuntimeError>,
type EnvFuture = BoxSpawnEnvFuture<'a, E, Self::Error>
type Future = BoxStatusFuture<'a, Self::Error>
type Error = RuntimeError
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<T, E: ?Sized> Spawn<E> for AtomicTopLevelCommand<T> where
T: 'static + StringWrapper + Display + Send + Sync,
E: 'static + AsyncIoEnvironment + ArgumentsEnvironment<Arg = T> + ExecutableEnvironment + ExportedVariableEnvironment<VarName = T, Var = T> + FileDescEnvironment + FunctionEnvironment + IsInteractiveEnvironment + LastStatusEnvironment + ReportErrorEnvironment + SetArgumentsEnvironment + SubEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<T>,
E::Fn: Clone + From<Arc<SpawnBoxed<E, Error = RuntimeError> + Send + Sync + 'static>> + Spawn<E, Error = RuntimeError>,
[src]
T: 'static + StringWrapper + Display + Send + Sync,
E: 'static + AsyncIoEnvironment + ArgumentsEnvironment<Arg = T> + ExecutableEnvironment + ExportedVariableEnvironment<VarName = T, Var = T> + FileDescEnvironment + FunctionEnvironment + IsInteractiveEnvironment + LastStatusEnvironment + ReportErrorEnvironment + SetArgumentsEnvironment + SubEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<T>,
E::Fn: Clone + From<Arc<SpawnBoxed<E, Error = RuntimeError> + Send + Sync + 'static>> + Spawn<E, Error = RuntimeError>,
type EnvFuture = BoxSpawnEnvFuture<'static, E, Self::Error>
type Future = BoxStatusFuture<'static, Self::Error>
type Error = RuntimeError
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<'a, T: 'a, E: ?Sized> Spawn<E> for &'a AtomicTopLevelCommand<T> where
T: 'static + StringWrapper + Display + Send + Sync,
E: 'static + AsyncIoEnvironment + ArgumentsEnvironment<Arg = T> + ExecutableEnvironment + ExportedVariableEnvironment<VarName = T, Var = T> + FileDescEnvironment + FunctionEnvironment + IsInteractiveEnvironment + LastStatusEnvironment + ReportErrorEnvironment + SetArgumentsEnvironment + SubEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<T>,
E::Fn: Clone + From<Arc<SpawnBoxed<E, Error = RuntimeError> + Send + Sync + 'static>> + Spawn<E, Error = RuntimeError>,
[src]
T: 'static + StringWrapper + Display + Send + Sync,
E: 'static + AsyncIoEnvironment + ArgumentsEnvironment<Arg = T> + ExecutableEnvironment + ExportedVariableEnvironment<VarName = T, Var = T> + FileDescEnvironment + FunctionEnvironment + IsInteractiveEnvironment + LastStatusEnvironment + ReportErrorEnvironment + SetArgumentsEnvironment + SubEnvironment + UnsetVariableEnvironment + WorkingDirectoryEnvironment,
E::Args: From<Vec<E::Arg>>,
E::FileHandle: FileDescWrapper,
E::FnName: From<T>,
E::Fn: Clone + From<Arc<SpawnBoxed<E, Error = RuntimeError> + Send + Sync + 'static>> + Spawn<E, Error = RuntimeError>,
type EnvFuture = BoxSpawnEnvFuture<'a, E, Self::Error>
type Future = BoxStatusFuture<'a, Self::Error>
type Error = RuntimeError
fn spawn(self, env: &E) -> Self::EnvFuture
[src]
impl<E: ?Sized, T: Spawn<E>> Spawn<E> for Box<T>
[src]
impl<'a, E: ?Sized, T: 'a> Spawn<E> for &'a Box<T> where
&'a T: Spawn<E>,
[src]
&'a T: Spawn<E>,
Implementors
impl<T, I, E: ?Sized> Spawn<E> for Cd<I> where
T: StringWrapper,
I: Iterator<Item = T>,
E: AsyncIoEnvironment + ChangeWorkingDirectoryEnvironment + FileDescEnvironment + ReportErrorEnvironment + VariableEnvironment + WorkingDirectoryEnvironment,
E::FileHandle: Borrow<FileDesc>,
E::VarName: Borrow<String> + From<String>,
E::Var: Borrow<String> + From<String>, type EnvFuture = SpawnedCd<I>; type Future = ExitResult<CdFuture<E::WriteAll>>; type Error = Void;impl<E: ?Sized> Spawn<E> for Colon type EnvFuture = SpawnedColon; type Future = ExitStatus; type Error = Void;
impl<T, I, E: ?Sized> Spawn<E> for Echo<I> where
T: StringWrapper,
I: Iterator<Item = T>,
E: AsyncIoEnvironment,
E: FileDescEnvironment,
E: ReportErrorEnvironment,
E::FileHandle: Borrow<FileDesc>, type EnvFuture = SpawnedEcho<I>; type Future = ExitResult<EchoFuture<E::WriteAll>>; type Error = Void;impl<E: ?Sized> Spawn<E> for False type EnvFuture = SpawnedFalse; type Future = ExitStatus; type Error = Void;
impl<T, I, E: ?Sized> Spawn<E> for Pwd<I> where
T: StringWrapper,
I: Iterator<Item = T>,
E: AsyncIoEnvironment,
E: FileDescEnvironment,
E: ReportErrorEnvironment,
E::FileHandle: Borrow<FileDesc>,
E: WorkingDirectoryEnvironment, type EnvFuture = SpawnedPwd<I>; type Future = ExitResult<PwdFuture<E::WriteAll>>; type Error = Void;impl<T, I, E: ?Sized> Spawn<E> for Shift<I> where
T: StringWrapper,
I: Iterator<Item = T>,
E: ArgumentsEnvironment + ShiftArgumentsEnvironment + ReportErrorEnvironment, type EnvFuture = SpawnedShift<I>; type Future = ExitStatus; type Error = Void;impl<E: ?Sized> Spawn<E> for True type EnvFuture = SpawnedTrue; type Future = ExitStatus; type Error = Void;