use std::collections::HashMap; use sqlx::{Postgres, Transaction}; pub trait SeptaJson {} pub trait FromSeptaJson { fn from_septa_json(septa_json: T) -> ::anyhow::Result>; } pub trait FromSeptaJsonAndStations { fn from_septa_json(septa_json: T, stop_map: &HashMap) -> ::anyhow::Result>; } pub trait DbObj { fn create_table(tx: &mut Transaction<'_, Postgres>) -> impl std::future::Future< Output = ::anyhow::Result<()>> + Send; fn insert(&self, tx: &mut Transaction<'_, Postgres>) -> impl std::future::Future< Output = ::anyhow::Result<()>> + Send; fn insert_many(s: Vec, tx: &mut Transaction<'_, Postgres>) -> impl std::future::Future< Output = ::anyhow::Result<()>> + Send; } pub trait Fetchable {}