pub enum Error {
Show 14 variants
Io(Error),
Transport(Error),
Status(Status),
Json(Error),
Cbor(Error),
PeerId(ParseError),
Core(Error),
EnvVarMissing(&'static str, VarError),
NoFileName(PathBuf),
InvalidUri(InvalidUri),
InvalidUriParts(InvalidUriParts),
InvalidUrl(ParseError),
Reqwest(Error),
Response(String),
}Expand description
The error type for the SDK.
This error type is used throughout the SDK to represent all possible errors that can occur.
Variants§
Io(Error)
An IO error occurred.
Transport(Error)
A Tonic transport error occurred.
Status(Status)
A Tonic status error occurred.
Json(Error)
json only.An error occurred while serializing or deserializing data to/from JSON.
Cbor(Error)
cbor only.An error occurred while serializing or deserializing data to/from CBOR.
PeerId(ParseError)
An error occurred while parsing a PeerId.
Core(Error)
An error from the core library.
EnvVarMissing(&'static str, VarError)
An environment variable was expected to be set, but it wasn’t.
NoFileName(PathBuf)
A path was expected to have a file name, but it didn’t.
InvalidUri(InvalidUri)
network only.An error occurred while parsing a URI.
InvalidUriParts(InvalidUriParts)
network only.An error occurred while parsing URI parts.
InvalidUrl(ParseError)
network only.An error occurred while parsing a URL.
Reqwest(Error)
network only.An error occurred while sending a request.
Response(String)
network only.Got an error response from a HTTP request.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error> for Error
impl From<Error> for Error
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Source§impl From<InvalidUri> for Error
impl From<InvalidUri> for Error
Source§fn from(source: InvalidUri) -> Self
fn from(source: InvalidUri) -> Self
Source§impl From<InvalidUriParts> for Error
impl From<InvalidUriParts> for Error
Source§fn from(source: InvalidUriParts) -> Self
fn from(source: InvalidUriParts) -> Self
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.