pub struct CodeChunkRecord {
pub chunk_id: String,
pub source_scope: SourceScope,
pub path: String,
pub content: String,
pub range: CodeRange,
pub linked_symbol_ids: Vec<String>,
pub extraction: Option<CodeExtractionMetadata>,
}Expand description
Versioned retrievable code chunk.
Fields§
§chunk_id: String§source_scope: SourceScope§path: String§content: String§range: CodeRange§linked_symbol_ids: Vec<String>§extraction: Option<CodeExtractionMetadata>Implementations§
Source§impl CodeChunkRecord
impl CodeChunkRecord
Sourcepub fn new(
chunk_id: impl Into<String>,
source_scope: SourceScope,
path: impl Into<String>,
content: impl Into<String>,
range: CodeRange,
linked_symbol_ids: Vec<String>,
extraction: Option<CodeExtractionMetadata>,
) -> Result<Self, DomainError>
pub fn new( chunk_id: impl Into<String>, source_scope: SourceScope, path: impl Into<String>, content: impl Into<String>, range: CodeRange, linked_symbol_ids: Vec<String>, extraction: Option<CodeExtractionMetadata>, ) -> Result<Self, DomainError>
Validates a retrievable code chunk and deduplicates linked symbols.
Trait Implementations§
Source§impl Clone for CodeChunkRecord
impl Clone for CodeChunkRecord
Source§fn clone(&self) -> CodeChunkRecord
fn clone(&self) -> CodeChunkRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CodeChunkRecord
impl Debug for CodeChunkRecord
Source§impl<'de> Deserialize<'de> for CodeChunkRecord
impl<'de> Deserialize<'de> for CodeChunkRecord
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
Source§impl PartialEq for CodeChunkRecord
impl PartialEq for CodeChunkRecord
Source§fn eq(&self, other: &CodeChunkRecord) -> bool
fn eq(&self, other: &CodeChunkRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CodeChunkRecord
impl Serialize for CodeChunkRecord
impl Eq for CodeChunkRecord
impl StructuralPartialEq for CodeChunkRecord
Auto Trait Implementations§
impl Freeze for CodeChunkRecord
impl RefUnwindSafe for CodeChunkRecord
impl Send for CodeChunkRecord
impl Sync for CodeChunkRecord
impl Unpin for CodeChunkRecord
impl UnsafeUnpin for CodeChunkRecord
impl UnwindSafe for CodeChunkRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.