Skip to main content

koala_core/invariant/
context.rs

1use std::path::{Path, PathBuf};
2
3#[non_exhaustive]
4#[derive(Debug, Clone)]
5pub struct Context {
6    pub repo_root: PathBuf,
7}
8
9impl Context {
10    pub fn new(repo_root: impl Into<PathBuf>) -> Self {
11        Self {
12            repo_root: repo_root.into(),
13        }
14    }
15
16    pub fn root(&self) -> &Path {
17        &self.repo_root
18    }
19}