struct MemorySpace {
corrupted: Vec<(u8, u8)>,
goal: (u8, u8),
}
Fields§
§corrupted: Vec<(u8, u8)>
§goal: (u8, u8)
Implementations§
source§impl MemorySpace
impl MemorySpace
sourcefn steps_to_goal(&self, bytes: usize) -> Option<Position>
fn steps_to_goal(&self, bytes: usize) -> Option<Position>
Solves part 1, A* search for a path to the goal when only the first bytes
entries from self.corrupted
have
been applied .
sourcefn starting_position(&self) -> Position
fn starting_position(&self) -> Position
Utility for seeding the BinaryTree with the starting Position
Trait Implementations§
source§impl Debug for MemorySpace
impl Debug for MemorySpace
source§impl PartialEq for MemorySpace
impl PartialEq for MemorySpace
impl Eq for MemorySpace
impl StructuralPartialEq for MemorySpace
Auto Trait Implementations§
impl Freeze for MemorySpace
impl RefUnwindSafe for MemorySpace
impl Send for MemorySpace
impl Sync for MemorySpace
impl Unpin for MemorySpace
impl UnwindSafe for MemorySpace
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.