Skip to main content

fetch

Function fetch 

Source
pub fn fetch() -> Result<Vec<String>>
Expand description

Run the full cargofetch pipeline for the current directory and return the formatted display lines.

Calls cargo metadata, cargo --version, counts source lines/size, and counts git commits — then formats everything into a Vec<String> using the same logic as the CLI.

Returns an error if cargo metadata or cargo --version fail.