pub struct StubEndpoint {
pub method: &'static str,
pub path: &'static str,
pub handler_type: &'static str,
pub dispatch_fn: Option<fn(Vec<u8>, HashMap<String, String>, HashMap<String, String>, Option<Box<dyn IClaims>>) -> Pin<Box<dyn Future<Output = Result<ResponseData>> + Send>>>,
pub auth_required_role: &'static str,
pub authorizers: Option<Arc<AuthorizerSet>>,
}Expand description
A route endpoint that dispatches to the registered handler via cache.
When a dispatch function is available (generated by the endpoint macros), it constructs the request from the HTTP request data, calls the handler via the HandlerCache call bridge, and writes the JSON response. Falls back to a descriptive stub message when no dispatch function is registered.
Fields§
§method: &'static str§path: &'static str§handler_type: &'static str§dispatch_fn: Option<fn(Vec<u8>, HashMap<String, String>, HashMap<String, String>, Option<Box<dyn IClaims>>) -> Pin<Box<dyn Future<Output = Result<ResponseData>> + Send>>>§auth_required_role: &'static strDynamic authorizers (from IDynamicAuthorizer DI registrations).
Checked after static #[authorize] and before handler dispatch.
When None, no dynamic authorization checks run (pass-through).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StubEndpoint
impl !UnwindSafe for StubEndpoint
impl Freeze for StubEndpoint
impl Send for StubEndpoint
impl Sync for StubEndpoint
impl Unpin for StubEndpoint
impl UnsafeUnpin for StubEndpoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more