1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::{
    fmt::{Display, Formatter},
    sync::Arc,
};
mod display;

#[derive(Clone, Debug)]
pub struct Symbol {
    inner: Arc<str>,
}

impl AsRef<str> for Symbol {
    fn as_ref(&self) -> &str {
        self.inner.as_ref()
    }
}

impl Symbol {
    pub fn new(name: &str) -> Self {
        Self { inner: Arc::from(name) }
    }
}