cruding_axum_api 0.2.2

axum Cruding api wrapper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use cruding_core::Crudable;
use serde::{Deserialize, Serialize};

pub trait CrudableAxum: Crudable + Serialize + for<'de> Deserialize<'de>
where
    <Self as Crudable>::Pkey: From<<Self as CrudableAxum>::PkeyDe>,
{
    type PkeyDe: for<'de> Deserialize<'de> + Send;
}

// Narrow “Column: FromStr + Send + Sync + 'static” into one bound
pub trait ColumnParse: std::str::FromStr + Send + Sync + 'static {}
impl<T: std::str::FromStr + Send + Sync + 'static> ColumnParse for T {}

/// Pack the per-request dyn context into one alias to shorten bounds.
pub type ReqCtx<AxumCtx, InnerCtx> = (AxumCtx, InnerCtx);