1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Provides traits for parsing and serializing Minecraft text [`Component`]s.
//!
//! This module defines two core traits, [`ComponentParser`] and [`ComponentSerializer`],
//! which abstract the conversion between string representations and the internal
//! `Component` data structure.
//!
//! # Overview
//!
//! - [`ComponentParser`] allows parsing a string into a [`Component`].
//! - [`ComponentSerializer`] allows serializing a [`Component`] back into a string.
//!
//! These traits are intended to empower developers to implement conversions from and to other formats
//! without tying your code to a specific serialization or parsing library.
//!
//! # Use cases
//!
//! - Implement `ComponentParser` to convert from a user-provided formatted string (e.g., Discord Markdown)
//! into a `Component`.
//! - Implement `ComponentSerializer` to convert your `Component` back into a string format
//! (like a binary representation or custom formats) for storage, transmission, or display.
//!
use crateComponent;
/// A trait for parsing a string into a [`Component`].
/// A trait for serializing a [`Component`] into a string representation.