nushell/crates/nu-command/src/stor
Ian Manske 68fcd71898
Add Value::coerce_str (#11885)
# Description
Following #11851, this PR adds one final conversion function for
`Value`. `Value::coerce_str` takes a `&Value` and converts it to a
`Cow<str>`, creating an owned `String` for types that needed converting.
Otherwise, it returns a borrowed `str` for `String` and `Binary`
`Value`s which avoids a clone/allocation. Where possible, `coerce_str`
and `coerce_into_string` should be used instead of `coerce_string`,
since `coerce_string` always allocates a new `String`.
2024-02-18 17:47:10 +01:00
..
create.rs Add Value::coerce_str (#11885) 2024-02-18 17:47:10 +01:00
delete.rs Move stor commands to category Database (#11315) 2023-12-13 16:24:16 +01:00
export.rs Move stor commands to category Database (#11315) 2023-12-13 16:24:16 +01:00
import.rs Move stor commands to category Database (#11315) 2023-12-13 16:24:16 +01:00
insert.rs Move stor commands to category Database (#11315) 2023-12-13 16:24:16 +01:00
mod.rs Simplify the feature gates for stor commands (#11416) 2023-12-24 13:31:46 +01:00
open.rs Move stor commands to category Database (#11315) 2023-12-13 16:24:16 +01:00
reset.rs Move stor commands to category Database (#11315) 2023-12-13 16:24:16 +01:00
stor_.rs Move stor commands to category Database (#11315) 2023-12-13 16:24:16 +01:00
update.rs Move stor commands to category Database (#11315) 2023-12-13 16:24:16 +01:00