1
0
зеркало из https://github.com/glebtv/tui-textarea.git synced 2026-08-28 11:36:17 +03:00

update changelog for v0.5.1 changes

Этот коммит содержится в:
rhysd
2024-07-12 23:52:33 +09:00
родитель f6f6642969
Коммит 774f68c1b7
2 изменённых файлов: 56 добавлений и 0 удалений

Просмотреть файл

@@ -1,3 +1,33 @@
<a name="v0.5.1"></a>
# [v0.5.1](https://github.com/rhysd/tui-textarea/releases/tag/v0.5.1) - 12 Jul 2024
- Add `serde` optional feature. When it is enabled, some types support the serialization/deserialization with [serde](https://crates.io/crates/serde) crate. See [the document](https://github.com/rhysd/tui-textarea?tab=readme-ov-file#serializationdeserialization-support) for more details. ([#62](https://github.com/rhysd/tui-textarea/issues/62), thanks [@cestef](https://github.com/cestef))
```rust
use tui_textarea::Input;
let json = r#"
{
"key": { "Char": "a" },
"ctrl": true,
"alt": false,
"shift": true
}
"#;
let input: Input = serde_json::from_str(json).unwrap();
println!("{input}");
// Input {
// key: Key::Char('a'),
// ctrl: true,
// alt: false,
// shift: true,
// }
```
[Changes][v0.5.1]
<a name="v0.5.0"></a>
# [v0.5.0](https://github.com/rhysd/tui-textarea/releases/tag/v0.5.0) - 07 Jul 2024
@@ -317,6 +347,7 @@ First release :tada:
[Changes][v0.1.0]
[v0.5.1]: https://github.com/rhysd/tui-textarea/compare/v0.5.0...v0.5.1
[v0.5.0]: https://github.com/rhysd/tui-textarea/compare/v0.4.0...v0.5.0
[v0.4.0]: https://github.com/rhysd/tui-textarea/compare/v0.3.1...v0.4.0
[v0.3.1]: https://github.com/rhysd/tui-textarea/compare/v0.3.0...v0.3.1

Просмотреть файл

@@ -660,6 +660,30 @@ Values of the following types can be serialized/deserialized:
- `CursorMove`
- `Scrolling`
Here is an example for deserializing key input from JSON using [serde_json][].
```rust
use tui_textarea::Input;
let json = r#"
{
"key": { "Char": "a" },
"ctrl": true,
"alt": false,
"shift": true
}
"#;
let input: Input = serde_json::from_str(json).unwrap();
println!("{input}");
// Input {
// key: Key::Char('a'),
// ctrl: true,
// alt: false,
// shift: true,
// }
```
## 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.
@@ -705,3 +729,4 @@ tui-textarea is distributed under [The MIT License](./LICENSE.txt).
[pulls]: https://github.com/rhysd/tui-textarea/pulls
[regex]: https://docs.rs/regex/latest/regex/
[serde]: https://crates.io/crates/serde
[serde_json]: https://crates.io/crates/serde_json