nushell/src/commands/classified/pipeline.rs
Jason Gedge 339ec46961 Refactor classified.rs into separate modules.
Adds modules for internal, external, and dynamic commands, as well as
the pipeline functionality. These are exported as their old names from
the classified module so as to keep its "interface" the same.
2019-11-24 17:19:12 -05:00

25 lines
530 B
Rust

use crate::prelude::*;
use std::fmt;
use super::ClassifiedCommand;
#[derive(Debug, Clone)]
pub(crate) struct Pipeline {
pub(crate) commands: Spanned<Vec<ClassifiedCommand>>,
}
impl FormatDebug for Pipeline {
fn fmt_debug(&self, f: &mut DebugFormatter, source: &str) -> fmt::Result {
f.say_str(
"classified pipeline",
self.commands.iter().map(|c| c.debug(source)).join(" | "),
)
}
}
impl HasSpan for Pipeline {
fn span(&self) -> Span {
self.commands.span
}
}