pub struct CodeChunk {
pub file_path: String,
pub symbol_name: String,
pub kind: ChunkKind,
pub start_line: usize,
pub end_line: usize,
pub content: String,
pub tokens: Vec<String>,
pub token_count: usize,
pub input_origin: Option<InputOrigin>,
}Fields§
§file_path: String§symbol_name: String§kind: ChunkKind§start_line: usize§end_line: usize§content: String§tokens: Vec<String>§token_count: usize§input_origin: Option<InputOrigin>The untrusted origin of a provider chunk (pz21 §1.6). An index
written before it reads None: the chunk is then unknown.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeChunk
impl<'de> Deserialize<'de> for CodeChunk
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodeChunk, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CodeChunk, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CodeChunk> for ContentChunk
impl From<CodeChunk> for ContentChunk
Source§fn from(c: CodeChunk) -> ContentChunk
fn from(c: CodeChunk) -> ContentChunk
Converts to this type from the input type.
Source§impl From<ContentChunk> for CodeChunk
impl From<ContentChunk> for CodeChunk
Source§fn from(c: ContentChunk) -> CodeChunk
fn from(c: ContentChunk) -> CodeChunk
Converts to this type from the input type.
Source§impl Serialize for CodeChunk
impl Serialize for CodeChunk
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for CodeChunk
Auto Trait Implementations§
impl Forget for CodeChunk
impl Freeze for CodeChunk
impl Move for CodeChunk
impl RefUnwindSafe for CodeChunk
impl Send for CodeChunkwhere
RawVecInner: Send,
impl Sync for CodeChunkwhere
RawVecInner: Sync,
impl Unpin for CodeChunk
impl UnsafeUnpin for CodeChunkwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for CodeChunkwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more