pub enum ContentKind {
Code,
Docs,
Meta,
}Expand description
High-level content category of a chunked file.
Assigned at chunk-emission time based on the source file’s extension.
Used by downstream tools (get_repo_map, find_duplicates, search)
to filter corpus slices without re-examining every chunk’s content.
Serialized via rkyv and bitcode alongside CodeChunk so the
value survives the in-memory index round-trip without re-derivation.
The default is ContentKind::Code so that test fixtures and
pre-existing construction sites that don’t yet specify a kind continue
to behave as before (code-centric queries include them by default).
Variants§
Code
Source code files (.rs, .py, .ts, .go, etc.).
This is the default variant so that ..Default::default() in struct
update expressions produces ContentKind::Code.
Docs
Human-readable documentation (.md, .rst, .txt, .adoc, .org).
Meta
Machine-generated or structured data files (.json, .yaml, .toml,
.xml, .lock, .snap, .csv, .tsv, .proto).
Implementations§
Source§impl ContentKind
impl ContentKind
Sourcepub fn from_extension(ext: &str) -> Self
pub fn from_extension(ext: &str) -> Self
Classify a file extension (without leading dot, case-insensitive) into
a ContentKind.
Unknown extensions default to ContentKind::Code so that novel
source files are included in code search paths rather than silently
filtered.
Trait Implementations§
Source§impl Archive for ContentKind
impl Archive for ContentKind
Source§type Archived = ArchivedContentKind
type Archived = ArchivedContentKind
Source§type Resolver = ContentKindResolver
type Resolver = ContentKindResolver
Source§fn resolve(
&self,
resolver: <Self as Archive>::Resolver,
out: Place<<Self as Archive>::Archived>,
)
fn resolve( &self, resolver: <Self as Archive>::Resolver, out: Place<<Self as Archive>::Archived>, )
Source§const COPY_OPTIMIZATION: CopyOptimization<Self> = _
const COPY_OPTIMIZATION: CopyOptimization<Self> = _
serialize. Read moreSource§impl Clone for ContentKind
impl Clone for ContentKind
Source§fn clone(&self) -> ContentKind
fn clone(&self) -> ContentKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContentKind
impl Debug for ContentKind
Source§impl Default for ContentKind
impl Default for ContentKind
Source§fn default() -> ContentKind
fn default() -> ContentKind
Source§impl<__D: Fallible + ?Sized> Deserialize<ContentKind, __D> for Archived<ContentKind>
impl<__D: Fallible + ?Sized> Deserialize<ContentKind, __D> for Archived<ContentKind>
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<ContentKind, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<ContentKind, <__D as Fallible>::Error>
Source§impl Hash for ContentKind
impl Hash for ContentKind
Source§impl PartialEq for ContentKind
impl PartialEq for ContentKind
Source§fn eq(&self, other: &ContentKind) -> bool
fn eq(&self, other: &ContentKind) -> bool
self and other values to be equal, and is used by ==.impl Copy for ContentKind
impl<'__de> Decode<'__de> for ContentKindwhere
'__de:,
impl Encode for ContentKind
impl Eq for ContentKind
impl StructuralPartialEq for ContentKind
Auto Trait Implementations§
impl Freeze for ContentKind
impl RefUnwindSafe for ContentKind
impl Send for ContentKind
impl Sync for ContentKind
impl Unpin for ContentKind
impl UnsafeUnpin for ContentKind
impl UnwindSafe for ContentKind
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.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<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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.