pub struct SlackClientApiError {
pub code: String,
pub errors: Option<Vec<String>>,
pub warnings: Option<Vec<String>>,
pub http_response_body: Option<String>,
}Fields§
§code: String§errors: Option<Vec<String>>§warnings: Option<Vec<String>>§http_response_body: Option<String>Implementations§
Source§impl SlackClientApiError
impl SlackClientApiError
Sourcepub fn new(code: String) -> Self
pub fn new(code: String) -> Self
Creates a new SlackClientApiError from its required fields. Option fields start as None, and fields with #[default] take their default.
Sourcepub fn reset_errors(&mut self) -> &mut Self
pub fn reset_errors(&mut self) -> &mut Self
Sets errors to None.
Sourcepub fn mopt_errors(&mut self, value: Option<Vec<String>>) -> &mut Self
pub fn mopt_errors(&mut self, value: Option<Vec<String>>) -> &mut Self
Sets errors to the given Option.
Sourcepub fn with_errors(self, value: Vec<String>) -> Self
pub fn with_errors(self, value: Vec<String>) -> Self
Returns self with errors set to Some(value).
Sourcepub fn without_errors(self) -> Self
pub fn without_errors(self) -> Self
Returns self with errors set to None.
Sourcepub fn opt_errors(self, value: Option<Vec<String>>) -> Self
pub fn opt_errors(self, value: Option<Vec<String>>) -> Self
Returns self with errors 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 SlackClientApiError
impl Clone for SlackClientApiError
Source§impl Debug for SlackClientApiError
impl Debug for SlackClientApiError
Source§impl Display for SlackClientApiError
impl Display for SlackClientApiError
impl Eq for SlackClientApiError
Source§impl Error for SlackClientApiError
impl Error for SlackClientApiError
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()