pub enum ScribeError {
Show 16 variants
Http(Error),
Decode(Error),
Url(ParseError),
Api {
status: u16,
code: String,
message: String,
},
InvalidGrant {
message: String,
},
ConversionNotComplete {
message: String,
},
NotFound {
message: String,
},
Forbidden {
message: String,
},
NotTrashed {
message: String,
},
WebSocket(Box<Error>),
ChannelClosed,
ConversionInProgress {
message: String,
},
RateLimited {
message: String,
},
NeedsPurchase {
message: String,
purchase_url: String,
},
PasswordRequired {
message: String,
},
Channel {
message: String,
},
}Expand description
Every variant that can originate from a server response carries a
message: String — the server’s own human-readable sentence, passed
through unchanged. Never build user-facing text from a status code,
error code, or the internals of reqwest/serde_json here; those
stay out of Display (available via .source() for logging only).
Variants§
Http(Error)
Decode(Error)
Url(ParseError)
Api
InvalidGrant
ConversionNotComplete
NotFound
Forbidden
NotTrashed
WebSocket(Box<Error>)
The document channel’s WebSocket connection failed or was closed
unexpectedly. Boxed: tungstenite::Error is large enough on its own
to blow up the size of every other, far more common, error path.
ChannelClosed
ConversionInProgress
RateLimited
NeedsPurchase
PasswordRequired
The document is a password-protected file that hasn’t been unlocked yet. Prompt for the password and retry the same call with it.
Channel
Trait Implementations§
Source§impl Debug for ScribeError
impl Debug for ScribeError
Source§impl Display for ScribeError
impl Display for ScribeError
Source§impl Error for ScribeError
impl Error for ScribeError
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<Error> for ScribeError
impl From<Error> for ScribeError
Source§impl From<Error> for ScribeError
impl From<Error> for ScribeError
Source§impl From<ParseError> for ScribeError
impl From<ParseError> for ScribeError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ScribeError
impl !UnwindSafe for ScribeError
impl Forget for ScribeError
impl Freeze for ScribeError
impl Send for ScribeError
impl Sync for ScribeError
impl Unpin for ScribeError
impl UnsafeUnpin for ScribeError
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