Skip to main content

AutoIncrement

Trait AutoIncrement 

Source
pub trait AutoIncrement: Model {
    // Required method
    fn set_id(&mut self, id: i64);
}
Expand description

Marker trait for models that support automatic ID generation.

Required Methods§

Source

fn set_id(&mut self, id: i64)

Set the auto-generated ID after insert.

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§