feat: functions with formal parameters
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user