use super::IncludePlacement;
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
#[non_exhaustive]
pub struct ResolveOptions {
pub placement: IncludePlacement,
pub conditions: IncludeConditionVisibility,
pub directive_case: IncludeDirectiveCase,
pub unresolved_paths: UnresolvedIncludePath,
}
impl ResolveOptions {
#[must_use]
pub fn with_placement(mut self, placement: IncludePlacement) -> Self {
self.placement = placement;
self
}
#[must_use]
pub fn with_conditions(mut self, conditions: IncludeConditionVisibility) -> Self {
self.conditions = conditions;
self
}
#[must_use]
pub fn with_directive_case(mut self, directive_case: IncludeDirectiveCase) -> Self {
self.directive_case = directive_case;
self
}
#[must_use]
pub fn with_unresolved_paths(mut self, unresolved_paths: UnresolvedIncludePath) -> Self {
self.unresolved_paths = unresolved_paths;
self
}
}
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
#[non_exhaustive]
pub enum IncludeConditionVisibility {
#[default]
AllInputs,
RootSnapshot,
}
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
#[non_exhaustive]
pub enum IncludeDirectiveCase {
#[default]
Insensitive,
Canonical,
}
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
#[non_exhaustive]
pub enum UnresolvedIncludePath {
#[default]
Error,
Skip,
}