Enum conch_parser::ast::Redirect [] [src]

pub enum Redirect<W> {
    Read(Option<u16>, W),
    Write(Option<u16>, W),
    ReadWrite(Option<u16>, W),
    Append(Option<u16>, W),
    Clobber(Option<u16>, W),
    Heredoc(Option<u16>, W),
    DupRead(Option<u16>, W),
    DupWrite(Option<u16>, W),
}

Represents redirecting a command's file descriptors.

Generic over the representation of a shell word.

Variants

Open a file for reading, e.g. [n]< file.

Open a file for writing after truncating, e.g. [n]> file.

Open a file for reading and writing, e.g. [n]<> file.

Open a file for writing, appending to the end, e.g. [n]>> file.

Open a file for writing, failing if the noclobber shell option is set, e.g. [n]>| file.

Lines contained in the source that should be provided by as input to a file descriptor.

Duplicate a file descriptor for reading, e.g. [n]<& [n|-].

Duplicate a file descriptor for writing, e.g. [n]>& [n|-].

Trait Implementations

impl<W: Debug> Debug for Redirect<W>
[src]

Formats the value using the given formatter.

impl<W: PartialEq> PartialEq for Redirect<W>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<W: Eq> Eq for Redirect<W>
[src]

impl<W: Clone> Clone for Redirect<W>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more