Struct advent_of_code_2022::day_6::Counts
source · struct Counts {
counts: HashMap<char, usize>,
}
Expand description
Represents a window of characters over a data stream by their counts
Fields§
§counts: HashMap<char, usize>
Implementations§
source§impl Counts
impl Counts
sourcefn add_and_remove(&mut self, to_add: &char, to_remove: &char)
fn add_and_remove(&mut self, to_add: &char, to_remove: &char)
Advance the window by one character by adding the next character in the stream and removing the one that falls out.
Auto Trait Implementations§
impl RefUnwindSafe for Counts
impl Send for Counts
impl Sync for Counts
impl Unpin for Counts
impl UnwindSafe for Counts
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