pub struct ConfigOpts {
pub config: Option<PathBuf>,
}Available on crate feature
std only.Expand description
A simple and fast config option parser.
§Example
ⓘ
use shovel::*;
App {
name: "config",
description: "An example of ConfigOpts",
version: "0.1.0",
authors: ["Author Name <author@example.com>"],
copyright: "(c) 2026 Company Name",
action: Action::opts(|opts: ConfigOpts| {
match opts.config {
Some(p) => println!("The path of config is '{}'", p.display()),
None => println!("No config provided")
}
}),
}
.run()
.expect("Failed to run application");Fields§
§config: Option<PathBuf>The path of config.
Trait Implementations§
Source§impl Debug for ConfigOpts
impl Debug for ConfigOpts
Auto Trait Implementations§
impl Freeze for ConfigOpts
impl RefUnwindSafe for ConfigOpts
impl Send for ConfigOpts
impl Sync for ConfigOpts
impl Unpin for ConfigOpts
impl UnwindSafe for ConfigOpts
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