pub struct Entity {
pub name: String,
pub entity_type: EntityType,
pub completed_line_range: Range<usize>,
pub chunk_line_range: Range<usize>,
pub parent: Option<String>,
pub parent_line_range: Option<Range<usize>>,
}Expand description
Represents a code entity with its associated metadata.
This struct contains information about a specific code entity, including its name, type, and line ranges both in the original source code and within the current chunk.
Fields§
§name: Stringname of the entity
entity_type: EntityTypetype of the entity
completed_line_range: Range<usize>the line range of the entity in the source code including the doc string and the body
chunk_line_range: Range<usize>the line range of the chunk in the current chunk
parent: Option<String>if the entity is a method, the name of the parent struct or interface
parent_line_range: Option<Range<usize>>the line range of the parent in the source code
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Entity
impl<'de> Deserialize<'de> for Entity
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
impl StructuralPartialEq for Entity
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
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