mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 22:51:33 +02:00
Mark cli::Args non-exhaustive so ArgsBuilder usage is mandatory
This commit is contained in:
parent
fca038b23c
commit
0b79e93c84
@ -1,7 +1,6 @@
|
|||||||
//! CLI arguments and library Args struct
|
//! CLI arguments and library Args struct
|
||||||
//!
|
//!
|
||||||
//! Use `ArgsBuilder` preferentially as that will shield you from breaking changes resulting from
|
//! The [`Args`] struct is not constructable, use [`ArgsBuilder`].
|
||||||
//! added fields and some field type changes.
|
|
||||||
//!
|
//!
|
||||||
//! # Examples
|
//! # Examples
|
||||||
//!
|
//!
|
||||||
@ -26,6 +25,7 @@ use std::{
|
|||||||
#[derive(Builder, Clone, Debug)]
|
#[derive(Builder, Clone, Debug)]
|
||||||
#[builder(setter(into, strip_option))]
|
#[builder(setter(into, strip_option))]
|
||||||
#[builder(build_fn(validate = "Self::validate"))]
|
#[builder(build_fn(validate = "Self::validate"))]
|
||||||
|
#[non_exhaustive]
|
||||||
pub struct Args {
|
pub struct Args {
|
||||||
/// Command to execute in popen3 format (first program, rest arguments).
|
/// Command to execute in popen3 format (first program, rest arguments).
|
||||||
pub cmd: Vec<String>,
|
pub cmd: Vec<String>,
|
||||||
|
Loading…
Reference in New Issue
Block a user