pub struct Config {
pub session_id: Option<String>,
pub puzzle_dir: PathBuf,
pub sessions_dir: PathBuf,
pub passphrase: String,
pub start_time: DateTime<Utc>,
}Expand description
Configuration for the Advent of Code client.
Most users of this crate do not need to worry about how to initialize Config, or how to use
ConfigBuilder to create new Configs. Just use the load_config() function in this module to
get the behavior that is detailed in this crate’s README.md.
Fields§
§session_id: Option<String>Your Advent of Code session cookie. TODO: rename all instances to session.
puzzle_dir: PathBufDirectory where puzzle inputs and answers are stored.
sessions_dir: PathBufDirectory where per-session state (e.g., submission timeouts) is cached.
passphrase: StringPassphrase used to encrypt puzzle inputs on disk.
start_time: DateTime<Utc>Current time (usually UTC now, but can be overridden for testing).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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