Instead of can_forward() -> bool and can_forward_with_route() -> Option<Route>, we combine it into peek_forward() -> Option<Route>
forward() and back() also change from bool to Option<Route> in a
similar manner.
This commit includes a documentation update linking to the corresponding
peek function in the forward and back function, updated relevant tests,
which also got a few additional asserts to cover more pre and post-conditions.
Instead of
can_forward() -> bool
andcan_forward_with_route() -> Option<Route>
, we combine it intopeek_forward() -> Option<Route>
forward()
andback()
also change frombool
toOption<Route>
in a similar manner.This commit includes a documentation update linking to the corresponding peek function in the
forward
andback
function, updated relevant tests, which also got a few additional asserts to cover more pre and post-conditions.