nushell/crates/nu-protocol/src/pipeline
Ian Manske c5d716951f
Allow byte streams with unknown type to be compatiable with binary (#12959)
# Description
Currently, this pipeline doesn't work `open --raw file | take 100`,
since the type of the byte stream is `Unknown`, but `take` expects
`Binary` streams. This PR changes commands that expect
`ByteStreamType::Binary` to also work with `ByteStreamType::Unknown`.
This was done by adding two new methods to `ByteStreamType`:
`is_binary_coercible` and `is_string_coercible`. These return true if
the type is `Unknown` or matches the type in the method name.
2024-05-24 17:54:38 -07:00
..
byte_stream.rs Allow byte streams with unknown type to be compatiable with binary (#12959) 2024-05-24 17:54:38 -07:00
list_stream.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
metadata.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
mod.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
out_dest.rs Replace ExternalStream with new ByteStream type (#12774) 2024-05-16 07:11:18 -07:00
pipeline_data.rs Make from json --objects streaming (#12949) 2024-05-24 23:37:50 +00:00