use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use crate::{Language, Span};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum ChunkKind {
Function,
Method,
Struct,
Enum,
Trait,
Impl,
Module,
Class,
File,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Chunk {
pub id: String,
pub path: PathBuf,
pub language: Language,
pub kind: ChunkKind,
pub name: Option<String>,
pub content: String,
pub span: Span,
pub doc: Option<String>,
}