#[repr(u8)]pub enum CodeUnitType {
Show 13 variants
Module = 0,
Symbol = 1,
Type = 2,
Function = 3,
Parameter = 4,
Import = 5,
Test = 6,
Doc = 7,
Config = 8,
Pattern = 9,
Trait = 10,
Impl = 11,
Macro = 12,
}Expand description
The type of code unit stored in a node.
Variants§
Module = 0
A logical grouping (file, package, namespace, module).
Symbol = 1
A named entity (function, class, variable, constant).
Type = 2
A type definition (class, struct, interface, enum, type alias).
Function = 3
A callable unit (function, method, closure).
Parameter = 4
A function parameter or struct/class field.
Import = 5
A dependency declaration (import, require, use).
Test = 6
A test case or test suite.
Doc = 7
Documentation block (docstring, JSDoc, comment block).
Config = 8
Configuration value or constant.
Pattern = 9
An identified design pattern (Singleton, Factory, etc.).
Trait = 10
A trait, interface, or protocol definition.
Impl = 11
An implementation block (impl, class body).
Macro = 12
A macro definition or invocation.
Implementations§
Source§impl CodeUnitType
impl CodeUnitType
Sourcepub fn from_u8(value: u8) -> Option<Self>
pub fn from_u8(value: u8) -> Option<Self>
Convert from raw byte value.
Returns None for values that don’t correspond to a known variant.
Sourcepub fn is_callable(&self) -> bool
pub fn is_callable(&self) -> bool
Returns true if this type represents a callable.
Sourcepub fn is_container(&self) -> bool
pub fn is_container(&self) -> bool
Returns true if this type can have children.
Trait Implementations§
Source§impl Clone for CodeUnitType
impl Clone for CodeUnitType
Source§fn clone(&self) -> CodeUnitType
fn clone(&self) -> CodeUnitType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodeUnitType
impl Debug for CodeUnitType
Source§impl<'de> Deserialize<'de> for CodeUnitType
impl<'de> Deserialize<'de> for CodeUnitType
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>,
Source§impl Display for CodeUnitType
impl Display for CodeUnitType
Source§impl Hash for CodeUnitType
impl Hash for CodeUnitType
Source§impl PartialEq for CodeUnitType
impl PartialEq for CodeUnitType
Source§impl Serialize for CodeUnitType
impl Serialize for CodeUnitType
impl Copy for CodeUnitType
impl Eq for CodeUnitType
impl StructuralPartialEq for CodeUnitType
Auto Trait Implementations§
impl Freeze for CodeUnitType
impl RefUnwindSafe for CodeUnitType
impl Send for CodeUnitType
impl Sync for CodeUnitType
impl Unpin for CodeUnitType
impl UnsafeUnpin for CodeUnitType
impl UnwindSafe for CodeUnitType
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.