pub struct CodeEntity {
pub id: String,
pub name: String,
pub entity_type: EntityType,
pub file_path: String,
pub line_start: u32,
pub line_end: u32,
pub column_start: u32,
pub column_end: u32,
pub metadata: HashMap<String, String>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Core code entity that represents any trackable element in the codebase
Fields§
§id: String§name: String§entity_type: EntityType§file_path: String§line_start: u32§line_end: u32§column_start: u32§column_end: u32§metadata: HashMap<String, String>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl CodeEntity
impl CodeEntity
pub fn new( name: String, entity_type: EntityType, file_path: String, line_start: u32, line_end: u32, column_start: u32, column_end: u32, ) -> Self
pub fn with_metadata(self, key: String, value: String) -> Self
pub fn update_position( &mut self, line_start: u32, line_end: u32, column_start: u32, column_end: u32, )
pub fn get_signature(&self) -> String
Trait Implementations§
Source§impl Clone for CodeEntity
impl Clone for CodeEntity
Source§impl Debug for CodeEntity
impl Debug for CodeEntity
Source§impl<'de> Deserialize<'de> for CodeEntity
impl<'de> Deserialize<'de> for CodeEntity
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
Auto Trait Implementations§
impl Freeze for CodeEntity
impl RefUnwindSafe for CodeEntity
impl Send for CodeEntity
impl Sync for CodeEntity
impl Unpin for CodeEntity
impl UnsafeUnpin for CodeEntity
impl UnwindSafe for CodeEntity
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