pub fn new(
		origin: impl AsRef<Path>,
		explicit_watches: Vec<PathBuf>,
		explicit_ignores: Vec<PathBuf>,
	) -> Result<Self> {
		let this = Self {
			origin: PathBuf::from(origin.as_ref()),
			explicit_watches,
			explicit_ignores,
		};
		this.check()?;
		Ok(this)
	}
Create args with all fields set and check that they are correctly-formed.
crates/ignore-files/src/discover.rs