use std::sync::Arc;
pub trait ToArc {
fn arc(self) -> Arc<Self>;
}
impl<T> ToArc for T {
fn arc(self) -> Arc<Self> {
Arc::new(self)
}
}
pub trait ToBox {
fn boxed(self) -> Box<Self>;
}
impl<T> ToBox for T {
fn boxed(self) -> Box<Self> {
Box::new(self)
}
}