use sqlx::PgPool;
use std::time::Duration;
use tokio::sync::mpsc;
#[derive(Debug, Clone)]
pub struct MetricPoint {
use std::fmt;
use std::hash::{Hash, Hasher};
use std::marker::PhantomData;
use uuid::Uuid;
pub struct Id<T> {
use std::time::Duration;
use rand::Rng;
#[derive(Clone, Debug)]
pub struct BackoffPolicy {
pub base_delay: Duration,
pub enum Node {
File { name: String, size: u64 },
Dir { name: String, children: Vec<Node> },
}
impl Node {
use std::time::Duration;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Config {
pub endpoint: String,
pub timeout: Duration,
use color_eyre::Result;
fn might_fail() -> Result<()> {
Err(color_eyre::eyre::eyre!("Something went wrong"))
}
use serde::Deserialize;
#[derive(Debug, Deserialize)]
pub struct Page<T> {
pub items: Vec<T>,
#[serde(default)]
use pulldown_cmark::{html, Options, Parser};
use std::collections::HashSet;
pub struct SafeHtml(String);
impl SafeHtml {
use std::collections::HashMap;
use std::fmt;
#[derive(Debug, Clone)]
pub struct Document {
pub body: String,
use serde::{Deserialize, Deserializer};
#[derive(Debug, Deserialize)]
pub struct ListFilter {
#[serde(default)]
pub status: Status,
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct EmailAddress(String);
impl EmailAddress {
pub fn parse(raw: &str) -> Result<Self, String> {
if raw.contains('@') && !raw.starts_with('@') {
#[derive(Debug, Clone)]
pub enum Outcome {
Approve,
Review,
Reject(String),
}