pub struct InputResolver;Expand description
Resolves input sources into concrete, processable sources.
Handles expansion of glob patterns and filtering based on exclusion rules.
Implementations§
Source§impl InputResolver
impl InputResolver
Sourcepub fn resolve<'a>(
input: &Input,
file_extensions: FileExtensions,
skip_hidden: bool,
skip_ignored: bool,
excluded_paths: &'a PathExcludes,
) -> Pin<Box<dyn Stream<Item = Result<ResolvedInputSource>> + Send + 'a>>
pub fn resolve<'a>( input: &Input, file_extensions: FileExtensions, skip_hidden: bool, skip_ignored: bool, excluded_paths: &'a PathExcludes, ) -> Pin<Box<dyn Stream<Item = Result<ResolvedInputSource>> + Send + 'a>>
Resolve an input into a stream of concrete input sources.
This returns a stream of resolved input sources for the given input, taking into account the matching file extensions and respecting exclusions. Glob patterns are expanded into individual file paths.
§Returns
Returns a stream of Result<ResolvedInputSource> for all matching input
sources. Glob patterns are expanded, so FsGlob never appears in the
output.
§Errors
Returns an error (within the stream) if:
- The glob pattern is invalid or expansion encounters I/O errors
- Directory traversal fails, including:
- Permission denied when accessing directories or files
- I/O errors while reading directory contents
- Filesystem errors (disk errors, network filesystem issues, etc.)
- Invalid file paths or symbolic link resolution failures
- Errors when reading or evaluating
.gitignoreor.ignorefiles - Errors occur during file extension or path exclusion evaluation
Once an error is returned, resolution of that input source halts
and no further Ok(ResolvedInputSource) will be produced.
Sourcepub(crate) fn walk(
path: &Path,
file_extensions: FileExtensions,
skip_hidden: bool,
skip_ignored: bool,
) -> Result<Walk>
pub(crate) fn walk( path: &Path, file_extensions: FileExtensions, skip_hidden: bool, skip_ignored: bool, ) -> Result<Walk>
Sourcefn resolve_input<'a>(
input: &Input,
file_extensions: FileExtensions,
skip_hidden: bool,
skip_ignored: bool,
excluded_paths: &'a PathExcludes,
) -> Pin<Box<dyn Stream<Item = Result<ResolvedInputSource>> + Send + 'a>>
fn resolve_input<'a>( input: &Input, file_extensions: FileExtensions, skip_hidden: bool, skip_ignored: bool, excluded_paths: &'a PathExcludes, ) -> Pin<Box<dyn Stream<Item = Result<ResolvedInputSource>> + Send + 'a>>
Internal method for resolving input sources.
Takes an Input and returns a stream of ResolvedInputSource items,
expanding glob patterns and applying filtering based on the provided
configuration.
Sourcefn is_excluded_path(path: &Path, excluded_paths: &PathExcludes) -> bool
fn is_excluded_path(path: &Path, excluded_paths: &PathExcludes) -> bool
Check if the given path was excluded from link checking
Trait Implementations§
Source§impl Clone for InputResolver
impl Clone for InputResolver
Source§fn clone(&self) -> InputResolver
fn clone(&self) -> InputResolver
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InputResolver
impl Debug for InputResolver
impl Copy for InputResolver
Auto Trait Implementations§
impl Freeze for InputResolver
impl RefUnwindSafe for InputResolver
impl Send for InputResolver
impl Sync for InputResolver
impl Unpin for InputResolver
impl UnsafeUnpin for InputResolver
impl UnwindSafe for InputResolver
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
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>
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>
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