pub struct EndpointMetaStatic {
pub name: &'static str,
pub path: &'static str,
pub protocol: Protocol,
pub description: Option<&'static str>,
pub method: Option<&'static str>,
pub tags: &'static [&'static str],
pub request_schema_fn: Option<fn() -> Value>,
pub response_schema_fn: Option<fn() -> Value>,
}Expand description
Static-lifetime version of EndpointMeta used for compile-time
registration via the inventory crate.
Proc-macro generated code emits inventory::submit! blocks containing
this type (all fields are &'static str, which is const-constructible).
At runtime, EndpointMetaStatic::into_endpoint_meta converts each
entry into a heap-allocated EndpointMeta.
Fields§
§name: &'static strDisplay name of the endpoint.
path: &'static strURL path or MQTT topic string.
protocol: ProtocolTransport protocol.
description: Option<&'static str>Optional human-readable description.
method: Option<&'static str>HTTP verb, if applicable.
Tags for grouping, as a static string slice.
request_schema_fn: Option<fn() -> Value>Called once at startup to generate the request JSON Schema.
None for endpoints with no request body.
response_schema_fn: Option<fn() -> Value>Called once at startup to generate the response JSON Schema.
None for endpoints with no response schema.
Implementations§
Source§impl EndpointMetaStatic
impl EndpointMetaStatic
Sourcepub fn into_endpoint_meta(&self) -> EndpointMeta
pub fn into_endpoint_meta(&self) -> EndpointMeta
Converts the static reference into an owned EndpointMeta.