What is the static lifetime

The static lifetime guarantees a reference is valid for the entire duration of the program, typically used for string literals and hardcoded data.

The static lifetime ('static) means a reference is valid for the entire duration of the program. It applies to data stored in the binary itself, such as string literals, which never go out of scope.

fn main() {
    let s: &'static str = "I live forever";
    println!("{s}");
}

In your project, you see this used in Config::build to return a Result<Config, &'static str>, ensuring the error message string lives as long as the program runs.