pub enum SlackError {
Api {
method: String,
error: String,
needed: Option<String>,
},
Transport {
method: String,
detail: String,
},
RateLimited {
method: String,
retry_after: Duration,
},
Truncated {
method: String,
pages: usize,
},
}Variants§
Api
Slack answered ok: false. needed names the scope when it is a scope failure.
Transport
The transport failed, or the body was not the envelope we expect.
RateLimited
HTTP 429. Slack’s Web API surfaces these as a status, not an ok: false.
Truncated
A walk hit its page cap. The pages collected are the oldest the walk saw, not the whole thread, so it is a refusal rather than a success: advancing a cursor over a partial read would hide every reply past the cap for good.
Trait Implementations§
Source§impl Clone for SlackError
impl Clone for SlackError
Source§impl Debug for SlackError
impl Debug for SlackError
Source§impl Display for SlackError
impl Display for SlackError
Source§impl Error for SlackError
impl Error for SlackError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for SlackError
impl RefUnwindSafe for SlackError
impl Send for SlackError
impl Sync for SlackError
impl Unpin for SlackError
impl UnsafeUnpin for SlackError
impl UnwindSafe for SlackError
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more