pub struct RouteMetadata {
pub method: String,
pub path: String,
pub handler_name: String,
pub request_schema: Option<Value>,
pub response_schema: Option<Value>,
pub parameter_schema: Option<Value>,
pub file_params: Option<Value>,
pub is_async: bool,
pub cors: Option<CorsConfig>,
pub body_param_name: Option<String>,
pub jsonrpc_method: Option<Value>,
pub static_response: Option<Value>,
}Expand description
Route metadata extracted from bindings
Fields§
§method: String§path: String§handler_name: String§request_schema: Option<Value>§response_schema: Option<Value>§parameter_schema: Option<Value>§file_params: Option<Value>§is_async: bool§cors: Option<CorsConfig>§body_param_name: Option<String>Name of the body parameter (defaults to “body” if not specified)
jsonrpc_method: Option<Value>JSON-RPC method metadata (if this route is exposed as a JSON-RPC method)
static_response: Option<Value>Optional static response configuration: {"status": 200, "body": "OK", "content_type": "text/plain"}
When present, the handler is replaced by a StaticResponseHandler that bypasses the full
middleware pipeline for maximum throughput.
Trait Implementations§
Source§impl Clone for RouteMetadata
impl Clone for RouteMetadata
Source§fn clone(&self) -> RouteMetadata
fn clone(&self) -> RouteMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RouteMetadata
impl Debug for RouteMetadata
Source§impl<'de> Deserialize<'de> for RouteMetadata
impl<'de> Deserialize<'de> for RouteMetadata
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
Auto Trait Implementations§
impl !Freeze for RouteMetadata
impl RefUnwindSafe for RouteMetadata
impl Send for RouteMetadata
impl Sync for RouteMetadata
impl Unpin for RouteMetadata
impl UnwindSafe for RouteMetadata
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