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>,
}Fields§
§id: StringUnique identifier (hash of path + span)
path: PathBufSource file
language: LanguageProgramming language
kind: ChunkKindKind of code construct
name: Option<String>Name of the construct (e.g. function name)
content: StringRaw source text
span: SpanLocation in source file
doc: Option<String>Docstring / leading comment if any
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Chunk
impl<'de> Deserialize<'de> for Chunk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnsafeUnpin for Chunk
impl UnwindSafe for Chunk
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more