pub struct Handler {
pub name: &'static str,
pub invoker: &'static dyn HandlerInvoker,
pub meta: &'static HandlerMeta,
pub children: Vec<Handler>,
pub stable_id: u32,
pub method: &'static str,
pub path: &'static str,
}Expand description
A node in the handler tree.
Handlers form a tree structure: leaf nodes represent actual handler
functions, while group nodes (Handler::group) act as namespaces.
The stable_id field is a hash-based identifier used for binary
protocol dispatch, computed from the full handler path
(service_name + "/" + handler_name).
Fields§
§name: &'static strHandler or group name (one segment of the API path).
invoker: &'static dyn HandlerInvokerInvoker for leaf nodes; DummyInvoker for group nodes.
meta: &'static HandlerMetaMetadata; dummy metadata for group nodes.
children: Vec<Handler>Child handlers or groups (empty for leaf nodes).
stable_id: u32Hash-based stable ID for binary protocol dispatch.
Computed from fnv1a_32(service_name + "/" + handler_path).
method: &'static strHTTP method for ordinary routes. Empty for binary and group nodes.
path: &'static strRoute path for ordinary routes. Empty for binary and group nodes.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Handler
impl !UnwindSafe for Handler
impl Freeze for Handler
impl Send for Handler
impl Sync for Handler
impl Unpin for Handler
impl UnsafeUnpin for Handler
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