pub enum Error {
Api(ApiError),
Core(CoreError),
Server(ServerError),
RequiredValueIsMissing(String),
DeserializeJson(Error),
Stacked {
message: &'static str,
stack: Option<Box<Error>>,
},
}Expand description
The type that represents all erros in slack-framework-rs.
Variants§
Api(ApiError)
The error with Slack API Client.
Core(CoreError)
The error with commonly process.
Server(ServerError)
The error with server process.
RequiredValueIsMissing(String)
The error when the required value is missing.
DeserializeJson(Error)
The error that occurs with failed to deserialize JSON data.
Stacked
The stacked error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn required_value_is_missing(values: &[&str]) -> Self
pub fn required_value_is_missing(values: &[&str]) -> Self
Creates Error::RequiredValueIsMissing.
Sourcepub fn failed_to_request_by_http(
inner: &'static str,
e: impl Error + 'static + Send + Sync,
) -> Self
pub fn failed_to_request_by_http( inner: &'static str, e: impl Error + 'static + Send + Sync, ) -> Self
Creates ApiError::FailedToRequestByHttp.
Sourcepub fn failed_to_read_json(
inner: &'static str,
e: impl Error + 'static + Send + Sync,
) -> Self
pub fn failed_to_read_json( inner: &'static str, e: impl Error + 'static + Send + Sync, ) -> Self
Creates ApiError::FailedToReadJson.
Sourcepub fn failed_to_read_stream(
inner: &'static str,
e: impl Error + 'static + Send + Sync,
) -> Self
pub fn failed_to_read_stream( inner: &'static str, e: impl Error + 'static + Send + Sync, ) -> Self
Creates ApiError::FailedToReadStream.
Sourcepub fn failed_to_read_file_in_files_upload(
e: impl Error + 'static + Send + Sync,
) -> Self
pub fn failed_to_read_file_in_files_upload( e: impl Error + 'static + Send + Sync, ) -> Self
Sourcepub fn failed_creating_mulipart_data(
e: impl Error + 'static + Send + Sync,
) -> Self
pub fn failed_creating_mulipart_data( e: impl Error + 'static + Send + Sync, ) -> Self
Creates ApiError::FailedCreatingMulipartData.
Sourcepub fn parsing_number(
inner: &'static str,
e: impl Error + 'static + Send + Sync,
) -> Self
pub fn parsing_number( inner: &'static str, e: impl Error + 'static + Send + Sync, ) -> Self
Creates CoreError::ParsingNumber.
Sourcepub fn failed_to_initialize_hmac(e: impl Error + 'static + Send + Sync) -> Self
pub fn failed_to_initialize_hmac(e: impl Error + 'static + Send + Sync) -> Self
Creates CoreError::FailedToInitializeHmac.
Sourcepub fn failed_to_bind_socket(e: impl Error + 'static + Send + Sync) -> Self
pub fn failed_to_bind_socket(e: impl Error + 'static + Send + Sync) -> Self
Creates ServerError::FailedToBindSocket.
Sourcepub fn failed_to_serve(e: impl Error + 'static + Send + Sync) -> Self
pub fn failed_to_serve(e: impl Error + 'static + Send + Sync) -> Self
Creates ServerError::FailedToServe.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ServerError> for Error
impl From<ServerError> for Error
Source§fn from(source: ServerError) -> Self
fn from(source: ServerError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Mutably borrows from an owned value. Read more