pub trait SerializableId: Clone {
// Required methods
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.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.