pub struct CreateRouteRequest {
pub name: String,
pub host: Option<String>,
pub path: Option<String>,
pub upstream: String,
pub strip_path: Option<bool>,
pub priority: Option<i32>,
pub add_headers: Option<HashMap<String, String>>,
pub remove_headers: Option<Vec<String>>,
}Expand description
Body of POST /routes and PUT /routes/{id}.
Fields§
§name: StringRoute name, unique in the config.
host: Option<String>Host to match. Omit for any.
path: Option<String>Path to match, as a prefix.
upstream: StringName of the upstream to forward to.
strip_path: Option<bool>Whether to remove the matched prefix. Defaults to false.
priority: Option<i32>Higher is matched first. Defaults to 100.
add_headers: Option<HashMap<String, String>>Headers to add to the forwarded request.
remove_headers: Option<Vec<String>>Headers to remove from the forwarded request.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CreateRouteRequest
impl<'de> Deserialize<'de> for CreateRouteRequest
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 CreateRouteRequest
impl RefUnwindSafe for CreateRouteRequest
impl Send for CreateRouteRequest
impl Sync for CreateRouteRequest
impl Unpin for CreateRouteRequest
impl UnsafeUnpin for CreateRouteRequest
impl UnwindSafe for CreateRouteRequest
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more