#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ActionId(String);
impl ActionId {
pub fn new(id: impl Into<String>) -> Self {
Self(id.into())
}
pub fn as_str(&self) -> &str {
&self.0
}
}
impl From<&str> for ActionId {
fn from(value: &str) -> Self {
Self::new(value)
}
}
impl From<String> for ActionId {
fn from(value: String) -> Self {
Self::new(value)
}
}
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct InputId(String);
impl InputId {
pub fn new(id: impl Into<String>) -> Self {
Self(id.into())
}
pub fn as_str(&self) -> &str {
&self.0
}
}
impl From<&str> for InputId {
fn from(value: &str) -> Self {
Self::new(value)
}
}
impl From<String> for InputId {
fn from(value: String) -> Self {
Self::new(value)
}
}