mirror of
https://github.com/nushell/nushell.git
synced 2025-01-03 04:50:28 +01:00
17 lines
412 B
Rust
17 lines
412 B
Rust
use crate::prelude::*;
|
|
use futures::stream::BoxStream;
|
|
|
|
pub type InputStream = BoxStream<'static, Value>;
|
|
pub type OutputStream = BoxStream<'static, ReturnValue>;
|
|
|
|
crate fn empty_stream() -> OutputStream {
|
|
VecDeque::new().boxed()
|
|
}
|
|
|
|
crate fn single_output(item: Value) -> OutputStream {
|
|
let value = ReturnValue::Value(item);
|
|
let mut vec = VecDeque::new();
|
|
vec.push_back(value);
|
|
vec.boxed()
|
|
}
|