toasty_core/schema/app/
auto.rs

1/// How toasty should populate the field
2#[derive(Debug, Clone)]
3pub enum AutoStrategy {
4    Uuid(UuidVersion),
5    Increment,
6}
7
8#[derive(Debug, Clone)]
9pub enum UuidVersion {
10    V4,
11    V7,
12}
13
14impl AutoStrategy {
15    /// Returns `true` if the auto is [`Increment`].
16    ///
17    /// [`Increment`]: Auto::Increment
18    #[must_use]
19    pub fn is_increment(&self) -> bool {
20        matches!(self, Self::Increment)
21    }
22}