pub fn calculate_and_post<SolOutput, SolFn>(
    session: &str,
    year: impl Into<i32>,
    day: impl Into<i32>,
    part: impl Into<i32>,
    input_path: Option<impl AsRef<Path>>,
    cache_path: Option<impl AsRef<Path>>,
    solution: SolFn
) -> Result<()>where
    SolOutput: Display,
    SolFn: Fn(&str) -> SolOutput,
Expand description

Fetches the challenge input, calculate the answer, and post it to the AoC website

Will cache the input at path if provided

Will also cache the result / submission at the given path if provided

Returns Ok(()) if answer was correct or has already been given

Returns Err(Error::Incorrect) if the answer was wrong

Returns Err(Error::RateLimit(String)) if you are being rate-limited