Struct sozu_command_lib::proto::command::CustomHttpAnswers
source · pub struct CustomHttpAnswers {
pub answer_301: Option<String>,
pub answer_400: Option<String>,
pub answer_401: Option<String>,
pub answer_404: Option<String>,
pub answer_408: Option<String>,
pub answer_413: Option<String>,
pub answer_502: Option<String>,
pub answer_503: Option<String>,
pub answer_504: Option<String>,
pub answer_507: Option<String>,
}
Expand description
custom HTTP answers, useful for 404, 503 pages
Fields§
§answer_301: Option<String>
MovedPermanently
answer_400: Option<String>
BadRequest
answer_401: Option<String>
Unauthorized
answer_404: Option<String>
NotFound
answer_408: Option<String>
RequestTimeout
answer_413: Option<String>
PayloadTooLarge
answer_502: Option<String>
BadGateway
answer_503: Option<String>
ServiceUnavailable
answer_504: Option<String>
GatewayTimeout
answer_507: Option<String>
InsufficientStorage
Implementations§
source§impl CustomHttpAnswers
impl CustomHttpAnswers
sourcepub fn answer_301(&self) -> &str
pub fn answer_301(&self) -> &str
Returns the value of answer_301
, or the default value if answer_301
is unset.
sourcepub fn answer_400(&self) -> &str
pub fn answer_400(&self) -> &str
Returns the value of answer_400
, or the default value if answer_400
is unset.
sourcepub fn answer_401(&self) -> &str
pub fn answer_401(&self) -> &str
Returns the value of answer_401
, or the default value if answer_401
is unset.
sourcepub fn answer_404(&self) -> &str
pub fn answer_404(&self) -> &str
Returns the value of answer_404
, or the default value if answer_404
is unset.
sourcepub fn answer_408(&self) -> &str
pub fn answer_408(&self) -> &str
Returns the value of answer_408
, or the default value if answer_408
is unset.
sourcepub fn answer_413(&self) -> &str
pub fn answer_413(&self) -> &str
Returns the value of answer_413
, or the default value if answer_413
is unset.
sourcepub fn answer_502(&self) -> &str
pub fn answer_502(&self) -> &str
Returns the value of answer_502
, or the default value if answer_502
is unset.
sourcepub fn answer_503(&self) -> &str
pub fn answer_503(&self) -> &str
Returns the value of answer_503
, or the default value if answer_503
is unset.
sourcepub fn answer_504(&self) -> &str
pub fn answer_504(&self) -> &str
Returns the value of answer_504
, or the default value if answer_504
is unset.
sourcepub fn answer_507(&self) -> &str
pub fn answer_507(&self) -> &str
Returns the value of answer_507
, or the default value if answer_507
is unset.
Trait Implementations§
source§impl Clone for CustomHttpAnswers
impl Clone for CustomHttpAnswers
source§fn clone(&self) -> CustomHttpAnswers
fn clone(&self) -> CustomHttpAnswers
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CustomHttpAnswers
impl Debug for CustomHttpAnswers
source§impl Default for CustomHttpAnswers
impl Default for CustomHttpAnswers
source§impl<'de> Deserialize<'de> for CustomHttpAnswers
impl<'de> Deserialize<'de> for CustomHttpAnswers
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 Hash for CustomHttpAnswers
impl Hash for CustomHttpAnswers
source§impl Message for CustomHttpAnswers
impl Message for CustomHttpAnswers
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.source§impl Ord for CustomHttpAnswers
impl Ord for CustomHttpAnswers
source§fn cmp(&self, other: &CustomHttpAnswers) -> Ordering
fn cmp(&self, other: &CustomHttpAnswers) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for CustomHttpAnswers
impl PartialEq for CustomHttpAnswers
source§fn eq(&self, other: &CustomHttpAnswers) -> bool
fn eq(&self, other: &CustomHttpAnswers) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CustomHttpAnswers
impl PartialOrd for CustomHttpAnswers
source§fn partial_cmp(&self, other: &CustomHttpAnswers) -> Option<Ordering>
fn partial_cmp(&self, other: &CustomHttpAnswers) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for CustomHttpAnswers
impl Serialize for CustomHttpAnswers
impl Eq for CustomHttpAnswers
impl StructuralPartialEq for CustomHttpAnswers
Auto Trait Implementations§
impl Freeze for CustomHttpAnswers
impl RefUnwindSafe for CustomHttpAnswers
impl Send for CustomHttpAnswers
impl Sync for CustomHttpAnswers
impl Unpin for CustomHttpAnswers
impl UnwindSafe for CustomHttpAnswers
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
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.