mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 19:16:55 +02:00
Start extracting DBContext
This commit is contained in:
17
crates/common/yaak-database/src/update_source.rs
Normal file
17
crates/common/yaak-database/src/update_source.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case", tag = "type")]
|
||||
pub enum UpdateSource {
|
||||
Background,
|
||||
Import,
|
||||
Plugin,
|
||||
Sync,
|
||||
Window { label: String },
|
||||
}
|
||||
|
||||
impl UpdateSource {
|
||||
pub fn from_window_label(label: impl Into<String>) -> Self {
|
||||
Self::Window { label: label.into() }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user