#[non_exhaustive]pub enum DeepgramError {
DeepgramApiError {
body: String,
err: Error,
},
HttpError(Error),
ReqwestError(Error),
IoError(Error),
WsError(Error),
JsonError(Error),
UrlencodedError(Error),
StreamError(Box<dyn Error + Send + Sync + 'static>),
InvalidUrl,
WebsocketClose {
code: u16,
reason: String,
},
InternalClientError(Error),
UnexpectedServerResponse(Error),
}
Expand description
Errors that may arise from the deepgram
crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DeepgramApiError
The Deepgram API returned an error.
Fields
§
err: Error
Underlying reqwest::Error
from the HTTP request.
HttpError(Error)
Something went wrong when generating the http request.
ReqwestError(Error)
Something went wrong when making the HTTP request.
IoError(Error)
Something went wrong during I/O.
WsError(Error)
Something went wrong with WS.
JsonError(Error)
Something went wrong during serialization/deserialization.
UrlencodedError(Error)
Something went wrong during serialization/deserialization.
StreamError(Box<dyn Error + Send + Sync + 'static>)
The data stream produced an error
InvalidUrl
The provided base url is not valid
WebsocketClose
A websocket close from was received indicating an error
Fields
InternalClientError(Error)
An unexpected error occurred in the client
UnexpectedServerResponse(Error)
A Deepgram API server response was not in the expected format.
Trait Implementations§
Source§impl Debug for DeepgramError
impl Debug for DeepgramError
Source§impl Display for DeepgramError
impl Display for DeepgramError
Source§impl Error for DeepgramError
impl Error for DeepgramError
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 DeepgramError
impl From<Error> for DeepgramError
Source§impl From<Error> for DeepgramError
impl From<Error> for DeepgramError
Source§impl From<Error> for DeepgramError
impl From<Error> for DeepgramError
Source§impl From<Error> for DeepgramError
impl From<Error> for DeepgramError
Source§impl From<Error> for DeepgramError
impl From<Error> for DeepgramError
Auto Trait Implementations§
impl !Freeze for DeepgramError
impl !RefUnwindSafe for DeepgramError
impl Send for DeepgramError
impl Sync for DeepgramError
impl Unpin for DeepgramError
impl !UnwindSafe for DeepgramError
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