Skip to main content

Timestamps

Trait Timestamps 

Source
pub trait Timestamps: Model {
    // Required methods
    fn set_created_at(&mut self, timestamp: i64);
    fn set_updated_at(&mut self, timestamp: i64);
}
Expand description

Trait for models that track creation/update timestamps.

Required Methods§

Source

fn set_created_at(&mut self, timestamp: i64)

Set the created_at timestamp.

Source

fn set_updated_at(&mut self, timestamp: i64)

Set the updated_at timestamp.

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§