pub enum Error {
Show 35 variants
Status(StatusCode),
Json(StatusCode, Value),
Unauthorized,
BadRequest,
Forbidden,
Conflict,
RpcUnknownMethod(String),
NotFile(PathBuf),
NotDirectory(PathBuf),
DirectoryExists(PathBuf),
FileExists(PathBuf),
NoAccount(AccountId),
AccountExists(AccountId),
FileChecksumMismatch(String, String),
Protocol(Error),
Core(Error),
Backend(Error),
Signer(Error),
Storage(Error),
BackendStorage(StorageError),
Database(Error),
TryFromSlice(TryFromSliceError),
Url(ParseError),
HeaderValue(InvalidHeaderValue),
WebServer(Error),
Io(Error),
TomlDeser(Error),
TomlSer(Error),
AddrParse(AddrParseError),
Ecdsa(Error),
SerdeJson(Error),
Uuid(Error),
Base58(Error),
Http(Error),
Uri(InvalidUri),
}Expand description
Errors generated by the server module.
Variants§
Status(StatusCode)
HTTP status code.
Json(StatusCode, Value)
Status code with JSON response.
Unauthorized error.
BadRequest
Bad request error.
Forbidden
Forbidden access.
Conflict
Conflict.
RpcUnknownMethod(String)
Error generated when an RPC method is not supported.
NotFile(PathBuf)
Error generated when a path is not a file.
NotDirectory(PathBuf)
Error generated when a path is not a directory.
DirectoryExists(PathBuf)
Error generated when a directory already exists.
FileExists(PathBuf)
Error generated when a file already exists.
NoAccount(AccountId)
Error generated when an account is required.
AccountExists(AccountId)
Error generated when an account should not already exist.
FileChecksumMismatch(String, String)
Error generated when an uploaded file checksum does not match the expected checksum.
Protocol(Error)
Error generated by the protocol library.
Core(Error)
Error generated by the core library.
Backend(Error)
Error generated by the backend library.
Signer(Error)
Error generated by the signer library.
Storage(Error)
Error generated by the storage library.
BackendStorage(StorageError)
Error generated by the backend storage.
Database(Error)
Error generated by the database library.
TryFromSlice(TryFromSliceError)
Error generated converting from a slice.
Url(ParseError)
Error generated attempting to parse a URL.
HeaderValue(InvalidHeaderValue)
Error generated when a header value is invalid.
WebServer(Error)
Error generated by the web server library.
Io(Error)
Error generated by the io module.
TomlDeser(Error)
Error generated deserializing from TOML.
TomlSer(Error)
Error generated serializing to TOML.
AddrParse(AddrParseError)
Error generated attempting to parse a socket address.
Ecdsa(Error)
Error generate by the ECDSA library.
SerdeJson(Error)
Error generate by the JSON library.
Uuid(Error)
Error generate by the UUID library.
Base58(Error)
Error generated trying to decode from base58.
Http(Error)
Error generated by the HTTP library.
Uri(InvalidUri)
Error generated by the HTTP library.
Implementations§
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<AddrParseError> for Error
impl From<AddrParseError> for Error
Source§fn from(source: AddrParseError) -> Self
fn from(source: AddrParseError) -> Self
Source§impl From<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> 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<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<StorageError> for Error
impl From<StorageError> for Error
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(source: TryFromSliceError) -> Self
fn from(source: TryFromSliceError) -> Self
Source§impl IntoResponse for Error
impl IntoResponse for Error
Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Pointable for T
impl<T> Pointable for T
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.