pub trait DefaultWithId: HasId {
// Required method
fn default_with_id(id: u32) -> Self;
}
Expand description
A type that can be created with default values and an id.
Required Methods§
Sourcefn default_with_id(id: u32) -> Self
fn default_with_id(id: u32) -> Self
Creates a new default value of type T
, but with the given id.
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.