1#![doc = include_str!("../README.md")]
2mod icons;
3pub use icons::*;
4
5mod finder;
6pub use finder::get_icon;
7
8#[cfg(feature = "pyo3")]
9use pyo3::prelude::*;
10#[cfg(feature = "pyo3")]
11pub mod py_binding;
12
13#[cfg_attr(feature = "pyo3", pyclass(module = "octicons_pack", get_all, frozen))]
15#[derive(Debug)]
16pub struct Icon {
17 pub svg: &'static str,
19
20 pub slug: &'static str,
22 }
27
28#[cfg(feature = "pyo3")]
29#[cfg_attr(feature = "pyo3", pymethods)]
30impl Icon {
31 pub fn __repr__(&self) -> PyResult<String> {
32 Ok(format!("< Icon object for slug {} >", self.slug))
33 }
34}