pub struct ResolveConfig {
pub root: PathBuf,
pub max_depth: usize,
}Expand description
Configuration for the include resolution pass.
Fields§
§root: PathBufDirectory all include paths resolve under. Any include that
canonicalizes outside this root is a IncludeError::RootEscape.
Must be an absolute path. Lexical normalization treats .
and .. against an empty buffer as no-ops; passing a relative
or unnormalized root weakens the root-escape prefix check.
Callers (CLI, LSP) should canonicalize the root before
constructing ResolveConfig.
max_depth: usizeMaximum include depth. Default 8 (see ResolveConfig::DEFAULT_MAX_DEPTH).
Hitting the limit is an error, not a silent truncation.
Implementations§
Source§impl ResolveConfig
impl ResolveConfig
Sourcepub const DEFAULT_MAX_DEPTH: usize = 8
pub const DEFAULT_MAX_DEPTH: usize = 8
Default maximum include depth — enough for any reasonable atomization strategy (aggregator → per-chapter → per-section), bounded enough to keep the resolver’s worst-case work predictable.
Trait Implementations§
Source§impl Clone for ResolveConfig
impl Clone for ResolveConfig
Source§fn clone(&self) -> ResolveConfig
fn clone(&self) -> ResolveConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResolveConfig
impl RefUnwindSafe for ResolveConfig
impl Send for ResolveConfig
impl Sync for ResolveConfig
impl Unpin for ResolveConfig
impl UnsafeUnpin for ResolveConfig
impl UnwindSafe for ResolveConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more