default args for HandlerArgs

This commit is contained in:
Aiden McClelland
2024-01-24 12:31:20 -07:00
parent 779b02d9c3
commit 4faf4b4e95

View File

@@ -211,11 +211,16 @@ impl HandleAny for DynHandler {
} }
} }
#[allow(type_alias_bounds)]
pub type HandlerArgsFor<Context: IntoContext, H: HandlerTypes + ?Sized> = pub type HandlerArgsFor<Context: IntoContext, H: HandlerTypes + ?Sized> =
HandlerArgs<Context, H::Params, H::InheritedParams>; HandlerArgs<Context, H::Params, H::InheritedParams>;
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub struct HandlerArgs<Context: IntoContext, Params: Send + Sync, InheritedParams: Send + Sync> { pub struct HandlerArgs<
Context: IntoContext,
Params: Send + Sync = Empty,
InheritedParams: Send + Sync = Empty,
> {
pub context: Context, pub context: Context,
pub parent_method: VecDeque<&'static str>, pub parent_method: VecDeque<&'static str>,
pub method: VecDeque<&'static str>, pub method: VecDeque<&'static str>,