Skip to main content

lychee_lib/types/input/
mod.rs

1//! Input handling modules for lychee
2//!
3//! The modules in this directory work together to provide all the mechanisms
4//! for input handling in lychee.
5//!
6//! At its core, lychee is one big state machine, which takes various kinds of
7//! input sources, resolves them into concrete, processable sources, and
8//! extracts their content for link checking.
9//!
10//! There are a few main components involved in this process:
11//! - [`Input`]: The high-level interface that users interact with to provide
12//!   input sources and retrieve processed content.
13//! - [`InputSource`]: Represents the different kinds of input sources lychee
14//!   can handle, such as URLs, file paths, glob patterns, standard input, and
15//!   raw strings.
16//! - [`InputContent`]: Encapsulates the actual content extracted from an input
17//!   source, along with metadata about the source and file type.
18//! - [`InputResolver`]: The main driver that orchestrates the entire input
19//!   processing pipeline, resolving input sources and extracting their content.
20//! - [`ResolvedInputSource`]: Represents input sources after glob expansion --
21//!   no more glob patterns!
22
23// Make an exception here to allow using the same name for the module and its
24// sub-modules. We could name this `core`, but `input` is more intuitive.
25#[allow(clippy::module_inception)]
26pub mod input;
27
28pub mod content;
29pub mod resolver;
30pub mod source;
31
32pub use content::InputContent;
33pub use input::Input;
34pub use resolver::InputResolver;
35pub use source::InputSource;
36pub use source::ResolvedInputSource;