pub struct FileNode {
pub path: PathBuf,
pub name: String,
pub language: Option<String>,
pub line_count: usize,
}Expand description
A file in the repository with basic metadata.
Used by RepoMap to represent files in the codebase structure.
§Examples
use argus_core::FileNode;
use std::path::PathBuf;
let node = FileNode {
path: PathBuf::from("src/main.rs"),
name: "main.rs".into(),
language: Some("rust".into()),
line_count: 42,
};
assert_eq!(node.name, "main.rs");Fields§
§path: PathBufRelative path from the repository root.
name: StringFile name (last component of path).
language: Option<String>Detected programming language, if any.
line_count: usizeNumber of lines in the file.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileNode
impl<'de> Deserialize<'de> for FileNode
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 FileNode
impl RefUnwindSafe for FileNode
impl Send for FileNode
impl Sync for FileNode
impl Unpin for FileNode
impl UnsafeUnpin for FileNode
impl UnwindSafe for FileNode
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