[][src]Trait conch_runtime::eval::RedirectEval

pub trait RedirectEval<E: ?Sized> {
    type Handle;
    type Error;
    type EvalFuture: EnvFuture<E, Item = RedirectAction<Self::Handle>, Error = Self::Error>;
    fn eval(self, env: &E) -> Self::EvalFuture;
}

A trait for evaluating file descriptor redirections.

Associated Types

type Handle

The type of handle that should be added to the environment.

type Error

An error that can arise during evaluation.

type EvalFuture: EnvFuture<E, Item = RedirectAction<Self::Handle>, Error = Self::Error>

A future which will carry out the evaluation (but will not update the environment with the result).

Loading content...

Required methods

fn eval(self, env: &E) -> Self::EvalFuture

Evaluates a redirection path and opens the appropriate redirect.

Newly opened/closed/duplicated/heredoc file descriptors are NOT updated in the environment, and thus it is up to the caller to update the environment as appropriate.

Loading content...

Implementations on Foreign Types

impl<W, E: ?Sized> RedirectEval<E> for Redirect<W> where
    W: WordEval<E>,
    W::Error: From<RedirectionError>,
    E: FileDescEnvironment + IsInteractiveEnvironment + WorkingDirectoryEnvironment,
    E::FileHandle: Clone + From<FileDesc>, 
[src]

type Handle = E::FileHandle

type Error = W::Error

type EvalFuture = Redirect<W::EvalFuture>

impl<'a, W, E: ?Sized> RedirectEval<E> for &'a Redirect<W> where
    &'a W: WordEval<E>,
    <&'a W as WordEval<E>>::Error: From<RedirectionError>,
    E: FileDescEnvironment + IsInteractiveEnvironment + WorkingDirectoryEnvironment,
    E::FileHandle: Clone + From<FileDesc>, 
[src]

type Handle = E::FileHandle

type Error = <&'a W as WordEval<E>>::Error

type EvalFuture = Redirect<<&'a W as WordEval<E>>::EvalFuture>

Loading content...

Implementors

Loading content...