pub struct MetadataContext {
pub source_type: String,
pub language: Option<String>,
pub file_extension: Option<String>,
pub collection_name: String,
pub provider_config: Option<String>,
pub created_at: String,
pub modified_at: String,
pub existing_structure: Option<Vec<ChunkType>>,
}Expand description
Context information for metadata generation
Fields§
§source_type: StringProvider type (file, github, url, pdf, sql)
language: Option<String>Programming language (if applicable)
file_extension: Option<String>File extension (if applicable)
collection_name: StringCollection name
provider_config: Option<String>Provider configuration (JSON)
created_at: StringDocument creation timestamp
modified_at: StringDocument modification timestamp
existing_structure: Option<Vec<ChunkType>>AST chunk types found in document
Implementations§
Source§impl MetadataContext
impl MetadataContext
Sourcepub fn with_language(self, language: String) -> Self
pub fn with_language(self, language: String) -> Self
Set language
Sourcepub fn with_extension(self, extension: String) -> Self
pub fn with_extension(self, extension: String) -> Self
Set file extension
Sourcepub fn with_provider_config(self, config: String) -> Self
pub fn with_provider_config(self, config: String) -> Self
Set provider config
Sourcepub fn with_timestamps(self, created_at: String, modified_at: String) -> Self
pub fn with_timestamps(self, created_at: String, modified_at: String) -> Self
Set timestamps
Sourcepub fn with_structure(self, structure: Vec<ChunkType>) -> Self
pub fn with_structure(self, structure: Vec<ChunkType>) -> Self
Set existing structure
Trait Implementations§
Source§impl Clone for MetadataContext
impl Clone for MetadataContext
Source§fn clone(&self) -> MetadataContext
fn clone(&self) -> MetadataContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MetadataContext
impl RefUnwindSafe for MetadataContext
impl Send for MetadataContext
impl Sync for MetadataContext
impl Unpin for MetadataContext
impl UnwindSafe for MetadataContext
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