pub trait Id<K>where
K: Identifier,{
type Q: Borrow<K>;
// Required methods
fn from_id(id: Self::Q) -> Self;
fn get(&self) -> &Self::Q;
}
Expand description
The Id
trait describes the behavior of a type that can be used as an id.
An Id
is almost identical to an Identifier
, but it is a trait that can be implemented for any type.
Required Associated Types§
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.