use std::path::{Path, PathBuf};
use crate::models::{self};
#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct Occurrence {
pub language: models::parsed::Language,
pub absolute_path: PathBuf,
pub range: models::parsed::Range,
pub roles: models::parsed::Roles,
}
impl Occurrence {
#[must_use]
pub fn new(
language: models::parsed::Language,
absolute_path: &Path,
range: models::parsed::Range,
symbol_roles: models::parsed::Roles,
) -> Self {
Self {
language,
absolute_path: absolute_path.to_path_buf(),
range,
roles: symbol_roles,
}
}
}