pub struct RouteConfig {Show 13 fields
pub path_prefix: Option<String>,
pub path_exact: Option<String>,
pub path_regex: Option<String>,
pub host: Option<String>,
pub methods: Option<Vec<String>>,
pub header: Option<HeaderMatch>,
pub upstream: String,
pub strip_prefix: bool,
pub rewrite: Option<String>,
pub add_headers: Vec<HeaderValue>,
pub read_timeout_secs: Option<u64>,
pub connect_timeout_secs: Option<u64>,
pub description: Option<String>,
}Expand description
Route matching and upstream selection
Fields§
§path_prefix: Option<String>Path prefix to match (e.g., “/api”)
path_exact: Option<String>Exact path to match
path_regex: Option<String>Regex pattern to match
host: Option<String>Host header to match
methods: Option<Vec<String>>HTTP methods to match
header: Option<HeaderMatch>Header to match
upstream: StringTarget upstream name
strip_prefix: boolStrip the matched prefix before forwarding
rewrite: Option<String>Rewrite the path
add_headers: Vec<HeaderValue>Headers to add to request
read_timeout_secs: Option<u64>Read timeout in seconds
connect_timeout_secs: Option<u64>Connect timeout in seconds
description: Option<String>Description (for logging/debugging)
Trait Implementations§
Source§impl Clone for RouteConfig
impl Clone for RouteConfig
Source§fn clone(&self) -> RouteConfig
fn clone(&self) -> RouteConfig
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 RouteConfig
impl Debug for RouteConfig
Source§impl<'de> Deserialize<'de> for RouteConfig
impl<'de> Deserialize<'de> for RouteConfig
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 RouteConfig
impl RefUnwindSafe for RouteConfig
impl Send for RouteConfig
impl Sync for RouteConfig
impl Unpin for RouteConfig
impl UnwindSafe for RouteConfig
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