feat: functions with formal parameters

This commit is contained in:
2025-05-04 15:21:44 +08:00
parent bc50464db9
commit eea4a4ce9f
6 changed files with 53 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ pub struct Catchable {
msg: Option<String>,
}
#[derive(Debug, Clone, Hash, PartialEq, Eq, Constructor)]
#[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord, Constructor)]
pub struct Symbol(EcoString);
impl<T: Into<EcoString>> From<T> for Symbol {
@@ -24,3 +24,12 @@ impl Deref for Symbol {
}
}
impl Symbol {
pub fn into_inner(self) -> EcoString {
self.0
}
pub fn as_inner(&self) -> &EcoString {
&self.0
}
}