pub enum Redir {
Write {
fd: u32,
target: Word,
mode: WriteMode,
},
Read {
fd: u32,
target: Word,
},
ReadWrite {
fd: u32,
target: Word,
},
HereStr(Word),
HereDoc {
delimiter: String,
strip_tabs: bool,
body: Word,
},
DupFd {
src: u32,
dst: String,
},
}Variants§
Write
Read
ReadWrite
<> — the target is opened for reading AND writing (POSIX 2.7.5), so it is gated on both
faces. Neither alone is sufficient: the write gate would miss the disclosure of reading a
secret, and the read gate would miss the overwrite.
HereStr(Word)
HereDoc
Fields
§
body: WordThe body’s parsed EXPANSIONS. A heredoc body is data only when the delimiter is quoted
(<<'EOF', <<"EOF", <<\EOF, <<E"O"F); with a bare <<EOF the shell expands the
body exactly as it would a double-quoted string, so $(…) and backticks in it RUN.
Empty when the delimiter is quoted, so a quoted body stays pure data.
DupFd
Trait Implementations§
impl Eq for Redir
impl StructuralPartialEq for Redir
Auto Trait Implementations§
impl Freeze for Redir
impl RefUnwindSafe for Redir
impl Send for Redir
impl Sync for Redir
impl Unpin for Redir
impl UnsafeUnpin for Redir
impl UnwindSafe for Redir
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.