pub struct SubstitutionSpan {
pub start: usize,
pub end: usize,
pub pipeline: ParsedPipeline,
}Expand description
A command substitution’s position and recursively-parsed contents.
Fields§
§start: usizeByte offset of the substitution start within the parent’s text.
For substitutions on a ShellSegment, this indexes into
segment.command. For structural substitutions on a
ParsedPipeline, this is relative to the source text passed
to [parse_with_substitutions] at this recursion level (for
nested pipelines, that is the inner text of the parent
substitution, not the top-level command string).
end: usizeByte offset past the end of the substitution.
pipeline: ParsedPipelineThe recursively-parsed inner pipeline.
Trait Implementations§
Source§impl Clone for SubstitutionSpan
impl Clone for SubstitutionSpan
Source§fn clone(&self) -> SubstitutionSpan
fn clone(&self) -> SubstitutionSpan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubstitutionSpan
impl RefUnwindSafe for SubstitutionSpan
impl Send for SubstitutionSpan
impl Sync for SubstitutionSpan
impl Unpin for SubstitutionSpan
impl UnsafeUnpin for SubstitutionSpan
impl UnwindSafe for SubstitutionSpan
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