pub struct HandlerMeta {
pub name: String,
pub module_path: String,
pub request_type: String,
pub response_type: String,
pub error_type: String,
}Expand description
Owned handler metadata extracted from HandlerRegistration.
HandlerRegistration uses &'static str fields (baked in by macros).
This owned copy is serializable and decoupled from the inventory lifetime.
Fields§
§name: StringHandler function name (e.g., "dispatch_fleet").
module_path: StringFull module path (e.g., "my_game::api::fleet::dispatch").
request_type: StringRequest type name (e.g., "DispatchFleetCmd").
response_type: StringResponse type name (e.g., "FleetStatus").
error_type: StringError type name (e.g., "FleetError").
Implementations§
Source§impl HandlerMeta
impl HandlerMeta
Sourcepub fn from_registration(reg: &HandlerRegistration) -> Self
pub fn from_registration(reg: &HandlerRegistration) -> Self
Convert a static HandlerRegistration into an owned HandlerMeta.
Sourcepub fn collect_all() -> Vec<Self>
pub fn collect_all() -> Vec<Self>
Collect all HandlerRegistration entries from inventory into
owned HandlerMeta values.
Trait Implementations§
Source§impl Clone for HandlerMeta
impl Clone for HandlerMeta
Source§impl Debug for HandlerMeta
impl Debug for HandlerMeta
Source§impl<'de> Deserialize<'de> for HandlerMeta
impl<'de> Deserialize<'de> for HandlerMeta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HandlerMeta
Source§impl PartialEq for HandlerMeta
impl PartialEq for HandlerMeta
Source§impl Serialize for HandlerMeta
impl Serialize for HandlerMeta
impl StructuralPartialEq for HandlerMeta
Auto Trait Implementations§
impl Freeze for HandlerMeta
impl RefUnwindSafe for HandlerMeta
impl Send for HandlerMeta
impl Sync for HandlerMeta
impl Unpin for HandlerMeta
impl UnsafeUnpin for HandlerMeta
impl UnwindSafe for HandlerMeta
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