vial-srv 0.2.0

Framework-agnostic server logic for Vial
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use thiserror::Error;

#[derive(Error, Debug)]
pub enum ServerError {
    #[error("Both view count and expiration cannot be empty")]
    ViewAndExpireEmpty,
    #[error("Invalid expiration value. It must be in the future with max 30 day")]
    InvalidExpire,
    #[error("Invalid view count. It must be between 1 and 1000")]
    InvalidViewCount,
    #[error("Database error: {0}")]
    DatabaseError(String),
}