mod bucket;
mod buffer;
mod string;
#[cfg(feature = "backends")]
pub use self::{bucket::BucketBackend, buffer::BufferBackend, string::StringBackend};
use crate::Symbol;
#[cfg(feature = "backends")]
pub type DefaultBackend = StringBackend<crate::DefaultSymbol>;
pub trait Backend: Default {
type Symbol: Symbol;
type Iter<'a>: Iterator<Item = (Self::Symbol, &'a str)>
where
Self: 'a;
fn with_capacity(cap: usize) -> Self;
fn intern(&mut self, string: &str) -> Self::Symbol;
#[inline]
fn intern_static(&mut self, string: &'static str) -> Self::Symbol {
self.intern(string)
}
fn shrink_to_fit(&mut self);
fn resolve(&self, symbol: Self::Symbol) -> Option<&str>;
unsafe fn resolve_unchecked(&self, symbol: Self::Symbol) -> &str;
fn iter(&self) -> Self::Iter<'_>;
}