parse_style/serde/mod.rs
1//! (De)serializing foreign types as style strings & color words
2//!
3//! This module contains `#[serde(with)]`-compatible submodules that make it
4//! possible to directly serialize & deserialize types from foreign styling
5//! crates using style string syntax (for style types) or color words/RGB codes
6//! (for color types).
7//!
8//! Keep in mind that, due to incompatibilities between `parse-style`'s styling
9//! concepts and those of other crates, some data may be lost when
10//! (de)serializing using these modules. For example, deserializing the string
11//! `"red bold blink2"` as an `anstyle::Style` will result in a style with a red
12//! foreground and only a bold effect, as anstyle does not support rapid
13//! blinking.
14
15#[cfg(feature = "anstyle")]
16#[cfg_attr(docsrs, doc(cfg(all(feature = "anstyle", feature = "serde"))))]
17pub mod anstyle;
18
19#[cfg(feature = "crossterm")]
20#[cfg_attr(docsrs, doc(cfg(all(feature = "crossterm", feature = "serde"))))]
21pub mod crossterm;
22
23#[cfg(feature = "ratatui")]
24#[cfg_attr(docsrs, doc(cfg(all(feature = "ratatui", feature = "serde"))))]
25pub mod ratatui;