pub struct ForFragments<W, C> {
pub var: String,
pub var_comment: Option<Newline>,
pub words: Option<(Vec<Newline>, Vec<W>, Option<Newline>)>,
pub pre_body_comments: Vec<Newline>,
pub body: CommandGroup<C>,
}
Expand description
Parsed fragments relating to a shell for
command.
Fields§
§var: String
The name of the variable to which each of the words will be bound.
var_comment: Option<Newline>
A comment that begins on the same line as the variable declaration.
words: Option<(Vec<Newline>, Vec<W>, Option<Newline>)>
Any comments after the variable declaration, a group of words to iterator over, and comment defined on the same line as the words.
pre_body_comments: Vec<Newline>
Any comments that appear after the words
declaration (if it exists),
but before the body of commands.
body: CommandGroup<C>
The body to be invoked for every iteration.
Trait Implementations§
Source§impl<W: Clone, C: Clone> Clone for ForFragments<W, C>
impl<W: Clone, C: Clone> Clone for ForFragments<W, C>
Source§fn clone(&self) -> ForFragments<W, C>
fn clone(&self) -> ForFragments<W, C>
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 moreimpl<W: Eq, C: Eq> Eq for ForFragments<W, C>
impl<W, C> StructuralPartialEq for ForFragments<W, C>
Auto Trait Implementations§
impl<W, C> Freeze for ForFragments<W, C>
impl<W, C> RefUnwindSafe for ForFragments<W, C>where
C: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, C> Send for ForFragments<W, C>
impl<W, C> Sync for ForFragments<W, C>
impl<W, C> Unpin for ForFragments<W, C>
impl<W, C> UnwindSafe for ForFragments<W, C>where
C: UnwindSafe,
W: UnwindSafe,
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