#[non_exhaustive]pub enum DiscoveryError {
GlobPattern(PatternError),
GlobAccess {
path: String,
source: Error,
},
Io {
path: String,
source: Error,
},
Yaml {
path: String,
error: String,
},
Env {
path: String,
var_name: String,
},
Json {
path: String,
error: String,
},
UnsupportedExtension {
path: String,
extension: String,
},
JsonRequiresExplicitPattern {
path: String,
pattern: String,
},
TemplateNotFound {
path: String,
template_id: String,
},
DuplicateRouteId {
path: String,
route_id: String,
},
MaterializationFailed {
path: String,
source: TemplateError,
},
TemplateSpec {
path: String,
error: String,
},
}Expand description
Errors that can occur during route discovery.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
GlobPattern(PatternError)
Invalid glob pattern.
GlobAccess
Error accessing file while iterating glob.
Io
Error reading a file.
Yaml
Error parsing YAML content.
Env
Environment variable not set during interpolation.
Json
Error parsing JSON content.
UnsupportedExtension
File has an unsupported extension (not .yaml, .yml, or .json).
JsonRequiresExplicitPattern
JSON file matched by a broad glob pattern requires an explicit .json pattern.
TemplateNotFound
Template reference points to a template id that was never defined.
DuplicateRouteId
A route id was produced more than once across regular + materialized routes.
MaterializationFailed
Template parsing or materialization failed (invalid body, missing params, etc.).
TemplateSpec
Duplicate template id across files, or invalid template spec in file.
Trait Implementations§
Source§impl Debug for DiscoveryError
impl Debug for DiscoveryError
Source§impl Display for DiscoveryError
impl Display for DiscoveryError
Source§impl Error for DiscoveryError
impl Error for DiscoveryError
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 From<PatternError> for DiscoveryError
impl From<PatternError> for DiscoveryError
Source§fn from(source: PatternError) -> Self
fn from(source: PatternError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for DiscoveryError
impl !UnwindSafe for DiscoveryError
impl Freeze for DiscoveryError
impl Send for DiscoveryError
impl Sync for DiscoveryError
impl Unpin for DiscoveryError
impl UnsafeUnpin for DiscoveryError
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