grip/config.rs
1// Copyright 2026 Umberto Gotti <umberto.gotti@umbertogotti.dev>
2// Licensed under the MIT License
3// SPDX-License-Identifier: MIT
4
5use std::path::PathBuf;
6
7use crate::args::Args;
8
9#[derive(Debug, Clone)]
10pub struct Config {
11 pub path: PathBuf,
12 pub json: bool,
13 pub threshold: Option<u32>,
14 pub verbose: bool,
15}
16
17impl Config {
18 #[must_use]
19 pub fn from_args(args: Args) -> Self {
20 Self {
21 path: args.path,
22 json: args.json,
23 threshold: args.threshold,
24 verbose: args.verbose,
25 }
26 }
27}