pub enum SourceError {
Config {
message: String,
},
Auth {
message: String,
},
Refused {
message: String,
},
RateLimited {
retry_after_seconds: Option<u64>,
},
Unavailable {
message: String,
},
Malformed {
message: String,
},
}Expand description
Why a source could not answer.
Every variant carries owned data only, so an error survives the JSON-over-stdio boundary a subprocess-hosted plugin crosses without losing anything.
Variants§
Config
The source’s configuration block is wrong, or names something absent.
Auth
The credential was missing, malformed, or rejected.
Refused
The source understood the request and declined it.
RateLimited
The source asked the caller to slow down.
The source could not be reached at all.
Malformed
The source answered with something this interface cannot represent.
Trait Implementations§
Source§impl Clone for SourceError
impl Clone for SourceError
Source§fn clone(&self) -> SourceError
fn clone(&self) -> SourceError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceError
impl Debug for SourceError
Source§impl<'de> Deserialize<'de> for SourceError
impl<'de> Deserialize<'de> for SourceError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SourceError
impl Display for SourceError
Source§impl Error for SourceError
impl Error for SourceError
1.30.0 · 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 JsonSchema for SourceError
impl JsonSchema for SourceError
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for SourceError
impl PartialEq for SourceError
Source§impl Serialize for SourceError
impl Serialize for SourceError
impl StructuralPartialEq for SourceError
Auto Trait Implementations§
impl Freeze for SourceError
impl RefUnwindSafe for SourceError
impl Send for SourceError
impl Sync for SourceError
impl Unpin for SourceError
impl UnsafeUnpin for SourceError
impl UnwindSafe for SourceError
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