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}
15
16impl Config {
17 #[must_use]
18 pub fn from_args(args: Args) -> Self {
19 Self {
20 path: args.path,
21 json: args.json,
22 threshold: args.threshold,
23 }
24 }
25}