nushell/crates/nu_plugin_formats
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
..
src Add Value::coerce_str (#11885) 2024-02-18 17:47:10 +01:00
Cargo.toml Bump indexmap from 2.1.0 to 2.2.2 (#11746) 2024-02-08 12:31:41 +00:00
README.md Move some from xxx commands to plugin (#7942) 2023-02-13 12:42:08 +00:00

nu_plugin_formats

A nushell plugin to convert data to nushell tables.

support commands:

  1. from eml - original ported from nushell core.
  2. from ics - original ported from nushell core.
  3. from ini - original ported from nushell core.
  4. from vcf - original ported from nushell core.

Prerequisite

nushell, It's a nushell plugin, so you need it.

Usage

  1. compile the binary: cargo build
  2. register plugin(assume it's compiled in ./target/debug/):
register ./target/debug/nu_plugin_formats