pub trait SerializableId: Clone {
fn try_create(id: impl Into<String>) -> Result<Self, Error>
where
Self: Sized;
fn as_str(&self) -> &str;
fn id(&self) -> String;
fn key(&self) -> &'static str;
}
Expand description
This trait is for serializing ID to JSON.
It also has some getter functions.