Struct advent_of_code_2023::day_3::Gear
source · struct Gear {
part_1: u32,
part_2: u32,
}
Expand description
A representation of a gear by the two part numbers that make up its “gear ratio”
This type exists to implement PartialEq regardless of number ordering
Fields§
§part_1: u32
§part_2: u32
Implementations§
Trait Implementations§
impl Eq for Gear
impl StructuralEq for Gear
Auto Trait Implementations§
impl RefUnwindSafe for Gear
impl Send for Gear
impl Sync for Gear
impl Unpin for Gear
impl UnwindSafe for Gear
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.