pub struct App<'a> {
pub config: &'a Config,
pub runner: &'a dyn CommandRunner,
pub client: Option<&'a dyn AocClient>,
pub cache: &'a dyn AnswerCache,
pub inputs: &'a InputStore,
pub reporter: &'a mut dyn Reporter,
}Expand description
Everything a command handler needs.
Fields§
§config: &'a ConfigValidated configuration.
runner: &'a dyn CommandRunnerHow child processes are executed.
client: Option<&'a dyn AocClient>The Advent of Code client, absent when no session cookie is configured.
cache: &'a dyn AnswerCacheWhere accepted answers are remembered.
inputs: &'a InputStoreWhere downloaded puzzle inputs are kept. Concrete rather than a trait, unlike its neighbours: linking a project at a cached file is what it does, and there is no linking without a filesystem to do it on.
reporter: &'a mut dyn ReporterWhere output goes.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for App<'a>
impl<'a> !Send for App<'a>
impl<'a> !Sync for App<'a>
impl<'a> !UnwindSafe for App<'a>
impl<'a> Freeze for App<'a>
impl<'a> Unpin for App<'a>
impl<'a> UnsafeUnpin for App<'a>
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