pub struct MiddlewareErrors {
pub query: Option<String>,
pub service: Option<MiddlewareErrorsService>,
pub status: Option<Vec<String>>,
}
Expand description
ErrorPage holds the custom error middleware configuration. This middleware returns a custom page in lieu of the default, according to configured ranges of HTTP Status codes. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/errorpages/
Fields§
§query: Option<String>
Query defines the URL for the error page (hosted by service). The {status} variable can be used in order to insert the status code in the URL.
service: Option<MiddlewareErrorsService>
Service defines the reference to a Kubernetes Service that will serve the error page. More info: https://doc.traefik.io/traefik/v3.3/middlewares/http/errorpages/#service
status: Option<Vec<String>>
Status defines which status or range of statuses should result in an error page. It can be either a status code as a number (500), as multiple comma-separated numbers (500,502), as ranges by separating two codes with a dash (500-599), or a combination of the two (404,418,500-599).
Implementations§
Source§impl MiddlewareErrors
impl MiddlewareErrors
Sourcepub fn builder() -> MiddlewareErrorsBuilder<((), (), ())>
pub fn builder() -> MiddlewareErrorsBuilder<((), (), ())>
Create a builder for building MiddlewareErrors
.
On the builder, call .query(...)
(optional), .service(...)
(optional), .status(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of MiddlewareErrors
.
Trait Implementations§
Source§impl Clone for MiddlewareErrors
impl Clone for MiddlewareErrors
Source§fn clone(&self) -> MiddlewareErrors
fn clone(&self) -> MiddlewareErrors
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MiddlewareErrors
impl Debug for MiddlewareErrors
Source§impl Default for MiddlewareErrors
impl Default for MiddlewareErrors
Source§fn default() -> MiddlewareErrors
fn default() -> MiddlewareErrors
Source§impl<'de> Deserialize<'de> for MiddlewareErrors
impl<'de> Deserialize<'de> for MiddlewareErrors
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>,
Source§impl JsonSchema for MiddlewareErrors
impl JsonSchema for MiddlewareErrors
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl PartialEq for MiddlewareErrors
impl PartialEq for MiddlewareErrors
Source§impl Serialize for MiddlewareErrors
impl Serialize for MiddlewareErrors
impl StructuralPartialEq for MiddlewareErrors
Auto Trait Implementations§
impl Freeze for MiddlewareErrors
impl RefUnwindSafe for MiddlewareErrors
impl Send for MiddlewareErrors
impl Sync for MiddlewareErrors
impl Unpin for MiddlewareErrors
impl UnwindSafe for MiddlewareErrors
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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