use crate::*; #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Strng(String); impl std::ops::Deref for Strng { type Target = String; #[inline] fn deref(&self) -> &Self::Target { &self.0 } } impl std::fmt::Debug for Strng { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.0.fmt(f) } } impl std::fmt::Display for Strng { #[inline] fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { self.0.fmt(f) } } impl Strng { pub fn new() -> Self { Strng(String::new()) } } impl From for Strng { #[inline] fn from(s: String) -> Self { Strng(s) } } impl From for String { #[inline] fn from(s: Strng) -> Self { s.0 } } impl From for Strng { #[inline] fn from(s: TokenStream) -> Self { Strng(s.to_string()) } } impl From for TokenStream { #[inline] fn from(s: Strng) -> Self { syn::parse_str(&s.0).unwrap() } }