pub struct BashHeredoc {
pub tag: String,
pub strip_tabs: bool,
pub quoted: bool,
pub lines: Vec<String>,
pub fd: Option<u8>,
}Expand description
A bash heredoc block.
Fields§
§tag: StringThe delimiter tag (e.g. “EOF”, “SCRIPT”).
strip_tabs: boolWhether to use <<- (strip leading tabs) instead of <<.
quoted: boolWhether to quote the tag (prevents expansion in body).
lines: Vec<String>The heredoc body lines.
fd: Option<u8>Target file descriptor (default 1 = stdout).
Implementations§
Source§impl BashHeredoc
impl BashHeredoc
Sourcepub fn strip_tabs(self) -> Self
pub fn strip_tabs(self) -> Self
Use <<- to strip leading tabs.
Sourcepub fn redirect_fd(self, fd: u8) -> Self
pub fn redirect_fd(self, fd: u8) -> Self
Redirect to a specific file descriptor.
Trait Implementations§
Source§impl Clone for BashHeredoc
impl Clone for BashHeredoc
Source§fn clone(&self) -> BashHeredoc
fn clone(&self) -> BashHeredoc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BashHeredoc
impl Debug for BashHeredoc
Source§impl PartialEq for BashHeredoc
impl PartialEq for BashHeredoc
impl StructuralPartialEq for BashHeredoc
Auto Trait Implementations§
impl Freeze for BashHeredoc
impl RefUnwindSafe for BashHeredoc
impl Send for BashHeredoc
impl Sync for BashHeredoc
impl Unpin for BashHeredoc
impl UnsafeUnpin for BashHeredoc
impl UnwindSafe for BashHeredoc
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