mirror of
https://github.com/Start9Labs/rpc-toolkit.git
synced 2026-03-26 02:11:56 +00:00
default args for HandlerArgs
This commit is contained in:
@@ -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>,
|
||||||
|
|||||||
Reference in New Issue
Block a user