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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.