From 1cb967f0ebb06197db417d0c14831633b6b8541e Mon Sep 17 00:00:00 2001 From: rhysd Date: Fri, 12 Jul 2024 23:43:16 +0900 Subject: [PATCH] describe serde support in readme document --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 519c718..cbcb831 100644 --- a/README.md +++ b/README.md @@ -644,6 +644,22 @@ loop { See [`split` example](./examples/split.rs) and [`editor` example](./examples/editor.rs) for working example. +### Serialization/Deserialization support + +This crate optionally supports [serde][] crate by enabling `serde` feature. + +```toml +[dependencies] +tui-textarea = { version = "*", features = ["serde"] } +``` + +Values of the following types can be serialized/deserialized: + +- `Key` +- `Input` +- `CursorMove` +- `Scrolling` + ## Minimum Supported Rust Version MSRV of this crate is depending on `tui` crate. Currently MSRV is 1.56.1. Note that `ratatui` crate requires more recent Rust version. @@ -688,3 +704,4 @@ tui-textarea is distributed under [The MIT License](./LICENSE.txt). [new-issue]: https://github.com/rhysd/tui-textarea/issues/new [pulls]: https://github.com/rhysd/tui-textarea/pulls [regex]: https://docs.rs/regex/latest/regex/ +[serde]: https://crates.io/crates/serde