pub struct InputStore { /* private fields */ }Implementations§
Source§impl InputStore
impl InputStore
Sourcepub fn global() -> Result<Self, ClientError>
pub fn global() -> Result<Self, ClientError>
Creates an account-specific global input store.
§Errors
Returns an error if the cache directory, session or account identity cannot be resolved.
Sourcepub fn get(&mut self, year: usize, day: usize) -> Result<String, ClientError>
pub fn get(&mut self, year: usize, day: usize) -> Result<String, ClientError>
Returns cached puzzle input or downloads it from Advent of Code.
§Errors
Returns an error if the input cannot be read, downloaded, or stored in the cache.
Sourcepub fn get_with_source(
&mut self,
year: usize,
day: usize,
) -> Result<(String, InputSource), ClientError>
pub fn get_with_source( &mut self, year: usize, day: usize, ) -> Result<(String, InputSource), ClientError>
Returns puzzle input together with its acquisition source.
§Errors
Returns an error if the input cannot be read, downloaded, or stored in the cache.
Sourcepub fn global_cache_root() -> Result<PathBuf, ClientError>
pub fn global_cache_root() -> Result<PathBuf, ClientError>
Returns the platform-specific global input cache directory.
§Errors
Returns an error if the system cache directory cannot be determined.
Auto Trait Implementations§
impl !RefUnwindSafe for InputStore
impl !UnwindSafe for InputStore
impl Forget for InputStore
impl Freeze for InputStorewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<InnerClientHandle> is !null: Freeze,
PhantomData<ArcInner<InnerClientHandle>>: Freeze,
impl Move for InputStore
impl Send for InputStore
impl Sync for InputStore
impl Unpin for InputStore
impl UnsafeUnpin for InputStorewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<InnerClientHandle> is !null: UnsafeUnpin,
PhantomData<ArcInner<InnerClientHandle>>: UnsafeUnpin,
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