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.
Trait Implementations§
Source§impl Clone for InputResolver
impl Clone for InputResolver
Source§fn clone(&self) -> InputResolver
fn clone(&self) -> InputResolver
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 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 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
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