pub struct SlackRateLimitError {
pub retry_after: Option<Duration>,
pub code: Option<String>,
pub warnings: Option<Vec<String>>,
pub http_response_body: Option<String>,
}Fields§
§retry_after: Option<Duration>§code: Option<String>§warnings: Option<Vec<String>>§http_response_body: Option<String>Implementations§
Source§impl SlackRateLimitError
impl SlackRateLimitError
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SlackRateLimitError from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn retry_after(&mut self, value: Duration) -> &mut Self
pub fn retry_after(&mut self, value: Duration) -> &mut Self
Sets retry_after to Some(value).
Sourcepub fn reset_retry_after(&mut self) -> &mut Self
pub fn reset_retry_after(&mut self) -> &mut Self
Sets retry_after to None.
Sourcepub fn mopt_retry_after(&mut self, value: Option<Duration>) -> &mut Self
pub fn mopt_retry_after(&mut self, value: Option<Duration>) -> &mut Self
Sets retry_after to the given Option.
Sourcepub fn with_retry_after(self, value: Duration) -> Self
pub fn with_retry_after(self, value: Duration) -> Self
Returns self with retry_after set to Some(value).
Sourcepub fn without_retry_after(self) -> Self
pub fn without_retry_after(self) -> Self
Returns self with retry_after set to None.
Sourcepub fn opt_retry_after(self, value: Option<Duration>) -> Self
pub fn opt_retry_after(self, value: Option<Duration>) -> Self
Returns self with retry_after set to the given Option.
Sourcepub fn reset_code(&mut self) -> &mut Self
pub fn reset_code(&mut self) -> &mut Self
Sets code to None.
Sourcepub fn without_code(self) -> Self
pub fn without_code(self) -> Self
Returns self with code set to None.
Sourcepub fn opt_code(self, value: Option<String>) -> Self
pub fn opt_code(self, value: Option<String>) -> Self
Returns self with code set to the given Option.
Sourcepub fn reset_warnings(&mut self) -> &mut Self
pub fn reset_warnings(&mut self) -> &mut Self
Sets warnings to None.
Sourcepub fn mopt_warnings(&mut self, value: Option<Vec<String>>) -> &mut Self
pub fn mopt_warnings(&mut self, value: Option<Vec<String>>) -> &mut Self
Sets warnings to the given Option.
Sourcepub fn with_warnings(self, value: Vec<String>) -> Self
pub fn with_warnings(self, value: Vec<String>) -> Self
Returns self with warnings set to Some(value).
Sourcepub fn without_warnings(self) -> Self
pub fn without_warnings(self) -> Self
Returns self with warnings set to None.
Sourcepub fn opt_warnings(self, value: Option<Vec<String>>) -> Self
pub fn opt_warnings(self, value: Option<Vec<String>>) -> Self
Returns self with warnings set to the given Option.
Sourcepub fn http_response_body(&mut self, value: String) -> &mut Self
pub fn http_response_body(&mut self, value: String) -> &mut Self
Sets http_response_body to Some(value).
Sourcepub fn reset_http_response_body(&mut self) -> &mut Self
pub fn reset_http_response_body(&mut self) -> &mut Self
Sets http_response_body to None.
Sourcepub fn mopt_http_response_body(&mut self, value: Option<String>) -> &mut Self
pub fn mopt_http_response_body(&mut self, value: Option<String>) -> &mut Self
Sets http_response_body to the given Option.
Sourcepub fn with_http_response_body(self, value: String) -> Self
pub fn with_http_response_body(self, value: String) -> Self
Returns self with http_response_body set to Some(value).
Sourcepub fn without_http_response_body(self) -> Self
pub fn without_http_response_body(self) -> Self
Returns self with http_response_body set to None.
Sourcepub fn opt_http_response_body(self, value: Option<String>) -> Self
pub fn opt_http_response_body(self, value: Option<String>) -> Self
Returns self with http_response_body set to the given Option.
Trait Implementations§
Source§impl Clone for SlackRateLimitError
impl Clone for SlackRateLimitError
Source§impl Debug for SlackRateLimitError
impl Debug for SlackRateLimitError
Source§impl Display for SlackRateLimitError
impl Display for SlackRateLimitError
impl Eq for SlackRateLimitError
Source§impl Error for SlackRateLimitError
impl Error for SlackRateLimitError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()