pub struct Problem { /* private fields */ }
Expand description
Represents a problem for Advent of Code.
There are a few different ways to create a Problem
:
with new
, a (Year, Day)
tuple implements From
, or
(u16, u8)
tuple implements TryFrom
by validating a
valid year and day is provided.
let a = Problem::new(Year::Y2017, 4);
let b = (Year::Y2017, 4).into();
let c = (2017_u16, 4_u8).try_into().unwrap();
assert_eq!(a, b);
assert_eq!(b, c);
Implementations§
Trait Implementations§
impl Copy for Problem
impl Eq for Problem
impl StructuralPartialEq for Problem
Auto Trait Implementations§
impl Freeze for Problem
impl RefUnwindSafe for Problem
impl Send for Problem
impl Sync for Problem
impl Unpin for Problem
impl UnwindSafe for Problem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.