use super::provider_schema_fragment::ProviderSchemaFragment;
#[expect(
clippy::large_enum_variant,
reason = "this transient outcome avoids a heap allocation on every successful lookup"
)]
#[derive(Debug)]
pub enum ChainLookupOutcome {
Resolved(Option<ProviderSchemaFragment>),
MissingSchema,
LocalOverrideUnreadable {
override_path: String,
io_error: String,
},
}
impl ChainLookupOutcome {
pub(crate) fn into_schema_fragment(self) -> Option<ProviderSchemaFragment> {
match self {
Self::Resolved(schema) => schema,
Self::MissingSchema | Self::LocalOverrideUnreadable { .. } => None,
}
}
}