river-data-core 0.1.0

Common types & traits for the in the river-data platform
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use sea_orm::DatabaseConnection;

pub trait SyncState: Clone + Send + Sync + 'static {
    fn db(&self) -> &DatabaseConnection;

    fn hash_token(&self, raw: &str) -> String {
        crate::crypto::hash_token(raw)
    }

    fn generate_token(&self) -> String {
        crate::crypto::generate_token()
    }
}