[−][src]Struct aocf::Aoc
Fields
year: Option<i32>
day: Option<u32>
level: Level
title: Option<String>
stars: Option<u8>
Methods
impl Aoc
[src]
pub fn new() -> Self
[src]
pub fn year(&mut self, year: Option<i32>) -> &mut Self
[src]
Set the year
pub fn day(&mut self, day: Option<u32>) -> &mut Self
[src]
Set the day
pub fn cookie(&mut self, cookie: &str) -> &mut Self
[src]
Set cookie string
pub fn cookie_file(&mut self, path: impl AsRef<Path>) -> &mut Self
[src]
Set cookie file
pub fn cache<P>(&mut self, path: Option<&Path>) -> &mut Self
[src]
Set the cache path
pub fn init(&mut self) -> Result<Self, Error>
[src]
Initialise (finish building)
pub fn get_brief(&mut self, force: bool) -> Result<String, Error>
[src]
Get the problem brief as HTML and sanitise it to markdown
pub fn get_input(&mut self, force: bool) -> Result<String, Error>
[src]
Get the input data
pub fn submit(&mut self, solution: &str) -> Result<String, Error>
[src]
Submit the solution
pub fn to_json(&self) -> Result<String, Error>
[src]
get a JSON representation for the AoC problem
pub fn from_json(json: &str) -> Result<Self, Error>
[src]
get an AoC problem from JSON representation
pub fn write_json_to(&self, path: impl AsRef<Path>) -> Result<(), Error>
[src]
Save problem to path as JSON
pub fn load_json_from(path: impl AsRef<Path>) -> Result<Self, Error>
[src]
Load the problem from JSON
pub fn write(&self) -> Result<(), Error>
[src]
Write JSON cache
pub fn advance(&mut self) -> Result<(), Error>
[src]
pub fn get_time_until_release()
[src]
Get time until release
Trait Implementations
impl Clone for Aoc
[src]
impl Default for Aoc
[src]
impl<'de> Deserialize<'de> for Aoc
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Aoc
[src]
Auto Trait Implementations
impl RefUnwindSafe for Aoc
impl Send for Aoc
impl Sync for Aoc
impl Unpin for Aoc
impl UnwindSafe for Aoc
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,