pub struct CheckCmd { /* private fields */ }
Expand description
Implementation of the main check command of the cli.
Implementations§
Source§impl CheckCmd
impl CheckCmd
Sourcepub fn global_result(hs: HashSet<CheckResult>) -> bool
pub fn global_result(hs: HashSet<CheckResult>) -> bool
Return true if all checks were OK, false otherwise.
Sourcepub fn run(
config: &PRDocConfig,
schema: Option<PathBuf>,
dir: &PathBuf,
file: Option<PathBuf>,
numbers: Option<Vec<PRNumber>>,
list: Option<PathBuf>,
) -> Result<HashSet<CheckResult>>
pub fn run( config: &PRDocConfig, schema: Option<PathBuf>, dir: &PathBuf, file: Option<PathBuf>, numbers: Option<Vec<PRNumber>>, list: Option<PathBuf>, ) -> Result<HashSet<CheckResult>>
Run the check: considering an input directory and either a file, some numbers, of a list file, run thru the list and check the validity of the PRDoc files. We return a Vec instead of a HashSet because a check based on a file may not always lead to a PR number, making the HashSet made of a bunch of (None, bool).
Auto Trait Implementations§
impl Freeze for CheckCmd
impl RefUnwindSafe for CheckCmd
impl Send for CheckCmd
impl Sync for CheckCmd
impl Unpin for CheckCmd
impl UnwindSafe for CheckCmd
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.