unicode_icons/lib.rs
1//! # Unicode Icons (Rust)
2//!
3//! Total groups: **10**
4//! Total functions: **1869**
5//!
6//! features:
7//! * [activities](./activities/index.html)
8//! * [animals_and_nature](./animals_and_nature/index.html)
9//! * [component](./component/index.html)
10//! * [flags](./flags/index.html)
11//! * [food_and_drink](./food_and_drink/index.html)
12//! * [objects](./objects/index.html)
13//! * [people_and_body](./people_and_body/index.html)
14//! * [symbols](./symbols/index.html)
15//! * [smileys_and_emotion](./smileys_and_emotion/index.html)
16//! * [travel_and_places](./travel_and_places/index.html)
17//!
18//! all are default
19//!
20//! ## Usage
21//!
22//! ```rust
23//! // examples/main.rs
24//!
25//! use unicode_icons::icons::{activities, flags};
26//!
27//! let format_string = format!("{} a string using format", activities::bullseye());
28//! println!("{}", format_string);
29//!
30//! println!("Christmas Tree: {}", activities::christmas_tree());
31//! println!("Cedy Flag: {}", flags::rainbow_flag());
32//!
33//! ```
34//!
35//!
36//! ### Output
37//!
38//! ````shell
39//! $ cargo run --example main
40//! 🎯 a string using format
41//! Christmas Tree: 🎄
42//! Cedy Flag: 🏳️🌈
43//! ````
44//!
45//! ## License
46//!
47//! This project is licensed under the **MIT** License.
48//!
49//! For more information, see the [LICENSE](LICENSE.md) file.
50//!
51//! ### Copyright (c) 2024 Ben
52
53use std::fmt;
54
55pub mod icons;
56
57/// wrapper struct to implement display trait
58pub struct Emoticon(pub String);
59
60impl fmt::Display for Emoticon {
61 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
62 write!(f, "{}", self.0)
63 }
64}
65
66// from https://www.unicode.org/emoji/charts/full-emoji-list.html and others IDK rn