pub enum PieFedError {
ReqwestError(Error),
Login {
response_status: StatusCode,
response_body: Value,
},
CommunityNotFound {
community_name: String,
response_status: StatusCode,
response_body: Value,
},
LanguageNotFound {
language_code: String,
available_languages: Vec<String>,
},
Post {
response_status: StatusCode,
response_body: Value,
},
CommunityIdNotInteger {
community_id: Value,
},
AllLanguagesNotArray {
all_languages: Value,
},
LanguageCodeNotString {
language_code: Value,
},
SiteRequestFailed {
response_status: StatusCode,
response_body: Value,
},
LanguageIdNotInteger {
language_id: Value,
},
}Expand description
Errors that can occur when posting to PieFed.
Variants§
ReqwestError(Error)
An error occurred during HTTP communication with the PieFed server.
Login
Error while logging into PieFed.
Fields
response_status: StatusCodeHTTP status code returned by the PieFed server.
CommunityNotFound
Error while finding a community in PieFed.
Fields
response_status: StatusCodeHTTP status code returned by the PieFed server.
LanguageNotFound
Error while finding a language in PieFed.
Fields
Post
Error while creating a post in PieFed.
Fields
response_status: StatusCodeHTTP status code returned by the PieFed server.
CommunityIdNotInteger
The community id returned by the PieFed server is not an integer.
AllLanguagesNotArray
The all languages field returned by the PieFed server is not an array.
LanguageCodeNotString
A language code returned by the PieFed server is not a string.
SiteRequestFailed
Fetching the site meta information from the PieFed server failed.
Fields
response_status: StatusCodeHTTP status code returned by the PieFed server.
LanguageIdNotInteger
The language id returned by the PieFed server is not an integer.
Trait Implementations§
Source§impl Debug for PieFedError
impl Debug for PieFedError
Source§impl Display for PieFedError
impl Display for PieFedError
Source§impl Error for PieFedError
impl Error for PieFedError
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
use the Display impl or to_string()