Trait DefaultWithId

Source
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§

Source

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.

Implementors§