sark-gen 0.11.0

Sark proc-macro generators
Documentation
use syn::{Ident, LitStr, Type, TypePath, Visibility};

#[derive(Clone, Copy, PartialEq, Eq, Default)]
pub(super) struct HeadSkip {
    pub(super) date: bool,
    pub(super) server: bool,
}

pub(super) struct AppRouteInput {
    pub(super) route: TypePath,
    pub(super) method: Ident,
    pub(super) path: LitStr,
    pub(super) wraps: Vec<TypePath>,
}

pub(super) struct AppDispatchInput {
    pub(super) vis: Visibility,
    pub(super) name: Ident,
    pub(super) state_ty: Type,
    pub(super) routes: Vec<AppRouteInput>,
}

#[derive(Clone)]
pub(super) struct HeaderAttrField {
    pub(super) ident: Ident,
    pub(super) header: LitStr,
    pub(super) default: Option<LitStr>,
    pub(super) ty: Type,
}

#[derive(Clone)]
pub(super) struct QueryAttrField {
    pub(super) ident: Ident,
    pub(super) query: LitStr,
    pub(super) default: Option<LitStr>,
    pub(super) ty: Type,
}

#[derive(Clone)]
pub(super) struct PathAttrField {
    pub(super) ident: Ident,
    pub(super) path: LitStr,
    pub(super) default: Option<LitStr>,
    pub(super) ty: Type,
}