2019-11-21 06:23:32 -08:00
|
|
|
use crate::common::*;
|
|
|
|
|
2019-11-07 10:55:15 -08:00
|
|
|
pub(crate) trait Keyed<'key> {
|
|
|
|
fn key(&self) -> &'key str;
|
|
|
|
}
|
2019-11-21 06:23:32 -08:00
|
|
|
|
|
|
|
impl<'key, T: Keyed<'key>> Keyed<'key> for Rc<T> {
|
|
|
|
fn key(&self) -> &'key str {
|
|
|
|
self.as_ref().key()
|
|
|
|
}
|
|
|
|
}
|