pub enum Error {
Show 19 variants
RequestError(Error),
IOError(Error),
JSONError(Error),
TOMLError(Error),
TOMLErrorSer(Error),
EnvError(VarError),
RequestNotOK(String, String),
RequestForbidden(String),
NoVersion(String),
NoConfigSpecified,
NoConfig,
NoConfigTable,
NoKeyfile,
NoXVer,
VerfileVer,
PkgNotInNewver(String),
PkgNotInConfig(String),
SourceNotFound(String),
ShellCommandFailed(String),
}Expand description
custom Error type for nvrs
Variantsยง
RequestError(Error)
reqwest errors
IOError(Error)
std::io errors
JSONError(Error)
serde_json errors
TOMLError(Error)
toml::de errors
TOMLErrorSer(Error)
toml::ser errors
EnvError(VarError)
[std::env] errors
RequestNotOK(String, String)
request status != OK
RequestForbidden(String)
request status == 430
NoVersion(String)
latest version of a package not found
NoConfigSpecified
specified configuration file not found
NoConfig
configuration file not found in any of the default locations
NoConfigTable
no __config__ in the configuration file
NoKeyfile
keyfile specified in the configuration not found
NoXVer
no oldver or newver in __config__
VerfileVer
unsupported verfile version
PkgNotInNewver(String)
package not found in newver
PkgNotInConfig(String)
package not found in config
SourceNotFound(String)
source / API not found
ShellCommandFailed(String)
shell command failed
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()
Auto Trait Implementationsยง
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
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> 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.